Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add docs for Corellium modules #1969

Merged
merged 7 commits into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions corellium/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Flank - Corellium

The Flank test runner driven on Corellium backend.

### Modules

![flank-corellium-modules](http://www.plantuml.com/plantuml/proxy?cache=no&fmt=svg&src=https://raw.githubusercontent.com/Flank/flank/1951_Improve_Flank-Corellium_documentation/docs/corellium/modules.puml)

### Android test run

![corellium-run-test-android](http://www.plantuml.com/plantuml/proxy?cache=no&fmt=svg&src=https://raw.githubusercontent.com/Flank/flank/1951_Improve_Flank-Corellium_documentation/docs/corellium/run-test-android.puml)
9 changes: 9 additions & 0 deletions corellium/adapter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Flank - Corellium - Adapters

This module is implementing adapters that connect [API](../api) interfaces with Corellium [client](../client).

### References

* Module type - [adapter](../../docs/architecture.md#adapter)
* Dependency type - [static](../../docs/architecture.md#static_dependencies)
* Public API - [Api.kt](./src/main/kotlin/flank/corellium/Api.kt)
18 changes: 18 additions & 0 deletions corellium/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Flank - Corellium - API

This module specifies the API required by the business logic to operate on corellium features.

The API is designed to exactly meet domain requirements rather than reflect the remote protocol or third-party client.

### References

* Module type - [API](../../docs/architecture.md#api)
* Dependency type - [dynamic](../../docs/architecture.md#dynamic_dependencies)
* Public API - [CorelliumApi.kt](./src/main/kotlin/flank/corellium/api/CorelliumApi.kt)

## Features

* Authorizing corellium session - [Authorization.kt](./src/main/kotlin/flank/corellium/api/Authorization.kt)
* Invoking android virtual instances - [AndroidInstance.kt](./src/main/kotlin/flank/corellium/api/AndroidInstance.kt)
* Installing android apps and tests - [AndroidApps.kt](./src/main/kotlin/flank/corellium/api/AndroidApps.kt)
* Executing tests & getting logs - [AndroidTestPlan.kt](./src/main/kotlin/flank/corellium/api/AndroidApps.kt)
15 changes: 15 additions & 0 deletions corellium/apk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Android apk parser

Module responsible for retrieving data like:

* test cases names
* test runner name
* package name

from the provided apk files.

### References

* Module type - [tool](../../docs/architecture.md#tool)
* Dependency type - [dynamic](../../docs/architecture.md#dynamic_dependencies)
* Public API - [Apk.kt](./src/main/kotlin/flank/apk/Apk.kt)
8 changes: 4 additions & 4 deletions corellium/apk/src/main/kotlin/flank/apk/internal/Parse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import java.io.StringReader
import javax.xml.parsers.DocumentBuilderFactory

internal val parseApkTestCases = Apk.ParseTestCases { path ->
DexParser.findTestMethods(path)
.map(TestMethod::testName)
DexParser.findTestMethods(path).map(TestMethod::testName)
}

internal val parseApkPackageName = Apk.ParsePackageName { path ->
ApkFile(path).apkMeta.packageName
}

internal val parseApkInfo = Apk.ParseInfo { path ->
val apkFile = ApkFile(path)
Apk.Info(
packageName = ApkFile(path).apkMeta.packageName,
packageName = apkFile.apkMeta.packageName,
testRunner = DocumentBuilderFactory.newInstance()
.newDocumentBuilder()
.parse(InputSource(StringReader(ApkFile(path).manifestXml)))
.parse(InputSource(StringReader(apkFile.manifestXml)))
.getElementsByTagName("instrumentation").item(0).attributes
.getNamedItem("android:name").nodeValue
)
Expand Down
9 changes: 9 additions & 0 deletions corellium/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Flank - Corellium - CLI

This module is specifying and implementing a command-line user interface for Flank-Corellium features.

### References

* Module type - [presentation](../../docs/architecture.md#presentation)
* Dependency type - [static](../../docs/architecture.md#dynamic_dependencies)
* Public API - package [flank.corellium.cli](./src/main/kotlin/flank/corellium/cli)
Loading