KasperskyLab / Kaspresso

Android UI test framework
https://kasperskylab.github.io/Kaspresso/
Apache License 2.0
1.81k stars 153 forks source link

Kaspresso runner doen't hande crashes #628

Open sergeev-roman opened 10 months ago

sergeev-roman commented 10 months ago

Describe the bug After switch from allurejunitrunner to kaspressorunner tests runs stop handling crashes. Before switch runner+orchestrator work well if any app crashed. Now after crash they doesnt continue run other tests just stop command.

To Reproduce Steps to reproduce the behavior: Make tests where 1) target app crashes 2) tests app crashes Run tests with shell command CLASSPATH=$(pm path androidx.test.services) app_process / androidx.test.services.shellexecutor.ShellMain am instrument -r -w -e targetInstrumentation {target_package}/com.kaspersky.kaspresso.runner.KaspressoRunner -e debug false -e class '{test_to_run}' androidx.test.orchestrator/androidx.test.orchestrator.AndroidTestOrchestrator

Expected behavior After crashes run other tests

Smartphone (please complete the following information):

Message in log for crashes INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_RESULT: shortMsg=Process crashed. INSTRUMENTATION_CODE: 0

After this message shoud be run another tests, but it doens happen

sergeev-roman commented 10 months ago

It ruins all allure-results also, because kaspresso runner moves dir to /sdcard/Documents/ after the run, if runner crashes - no results in /Documents