From 0ece007969292020a884a7b3e96174852728c9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janek=20G=C3=B3ral?= Date: Mon, 28 Jun 2021 23:06:03 +0200 Subject: [PATCH] Update flank_corellium.md --- .../cli/RunTestCorelliumAndroidCommandTest.kt | 2 +- docs/flank_corellium.md | 32 ++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/corellium/cli/src/test/kotlin/flank/corellium/cli/RunTestCorelliumAndroidCommandTest.kt b/corellium/cli/src/test/kotlin/flank/corellium/cli/RunTestCorelliumAndroidCommandTest.kt index 42c30b134c..b177198e54 100644 --- a/corellium/cli/src/test/kotlin/flank/corellium/cli/RunTestCorelliumAndroidCommandTest.kt +++ b/corellium/cli/src/test/kotlin/flank/corellium/cli/RunTestCorelliumAndroidCommandTest.kt @@ -239,7 +239,7 @@ password: $password details = Instrument.Status.Details(emptyMap(), "Class", "Test", null) ) ), - Unit event ExecuteTests.Error("1", NullPointerException(), "path/to/log/1", 5..10), + Unit event ExecuteTests.Error("1", Exception(), "path/to/log/1", 5..10), Unit event RunTestCorelliumAndroid.Created(File("path/to/apk.apk")), Unit event RunTestCorelliumAndroid.AlreadyExist(File("path/to/apk.apk")), ) diff --git a/docs/flank_corellium.md b/docs/flank_corellium.md index 634ba78253..fe62a52c5d 100644 --- a/docs/flank_corellium.md +++ b/docs/flank_corellium.md @@ -160,6 +160,34 @@ The successful run should generate the following files: * JUnitReport.xml * android_shards.json +* adb_log + * Directory that contains dumped log from `am instrument` commands. + * Each dump name is related instance id. + +### Errors + +The execution or its part can fail due to exceptions occur. +Typically, most of the errors can be sourced in incorrect initial arguments or network issues. + +List of known possible errors: + +#### Test result parsing + +Flank is using `am instrument` command to execute tests on Corellium devices. +The console output of the device is collected and parsed until all expected tests return their results. +Due to an invalid apk file, the console can print unexpected output that cannot be parsed by Flank. +In this case, Flank will print an error message similar to the following: + +``` +Error while parsing results from instance { instance id }. +For details check "results/corellium/android/{ report_dir }/adb_log/{ instance id }" lines { from..to }. +java.lang.Exception + at flank.corellium.cli.RunTestCorelliumAndroidCommandTest.outputTest(RunTestCorelliumAndroidCommandTest.kt:242) + { ... } +``` + +The visible exception is related directly to the parsing issue. +To see the source of the problem check the log file referenced in the error message. The file should contain a direct dump from `am instrument command`. # Features @@ -179,7 +207,3 @@ The successful run should generate the following files: * Structural logging. * iOS support. * and much more... - -# Known bugs - -* Missing `` tag for skipped test cases in JUnit report