Skip to content

Commit

Permalink
docs: Add docs for Corellium modules (#1969)
Browse files Browse the repository at this point in the history
Fixes #1951 

Added or updated README.md files:
* [:corellium](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium)
* [:corellium:adapter](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/adapter)
* [:corellium:api](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/api)
* [:corellium:apk](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/apk)
* [:corellium:cli](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/cli)
* [:corellium:client](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/client)
* [:corellium:domain](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/domain)
* [:corellium:instrument](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/instrument)
* [:corellium:instrument:command](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/instrument/command)
* [:corellium:instrument:log](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/instrument/log)
* [:corellium:junit](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/junit)
* [:corellium:sandbox](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/sandbox)
* [:corellium:shard](https://github.com/Flank/flank/tree/1951_Improve_Flank-Corellium_documentation/corellium/shard)

Additionally, this PR is fixing instrument log parsing to match the specification.
  • Loading branch information
jan-goral authored May 31, 2021
1 parent f703b77 commit 1799644
Show file tree
Hide file tree
Showing 37 changed files with 815 additions and 344 deletions.
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

0 comments on commit 1799644

Please sign in to comment.