Troubleshooting testrunner - adb

 

1 - Test did not run and show results from last iteration

There are 2 possible causes:

  1. You ran a test on a rooted device with the rooted field set to false in the config.yml file.

  2. You are working on an emulator, please do not use --no-update option anymore. Consequently, you are missing the launcher-android.tgz file in your Greenspector cache.


2 - Command error: exec: “$PATH_TO_ADB”: executable file not found in %PATH%

In the config.yml file, replace ${PATH_TO_ADB} with the path to the adb executable. Simply write "adb" if this command is already in your environment variables.


3 - Can’t read test file ./script.testgb

In the job.yml file, in the testFiles field, enter the path to your test scenario.


Your computer is connected to several devices via adb. In a command prompt, run the adb disconnect command, then connect to a single device as described in the section "Connecting your smartphone to your PC via Wifi".


Check whether the testrunner has been quarantined by your antivirus software.


INFO[2024-09-06T10:14:12+02:00] Reading configuration... INFO[2024-09-06T10:14:12+02:00] Reading job configuration... panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x74da6e] goroutine 1 [running]: gitlab.greenspector.com/kaliterre/testrunner/vendor/github.com/urfave/cli.HandleAction.func1() /go/src/gitlab.greenspector.com/kaliterre/testrunner/vendor/github.com/urfave/cli/app.go:472 +0x1d7 panic({0x91a340, 0xdfd1e0}) ...

A panic error displayed after the log INFO Reading configuration... means a bad yml format of config.yml file.

A panic error displayed after the log INFO Reading job configuration... means means a bad yml format job.yml file.

Please check tabulations are good or there is a space between ‘:' and the value.

Example bad syntax

  • Here there is a missing space between ‘name:’ and 'my test suite’

job: testsSuites: - name:my test suite testFiles: - ./sample.testgb

 

  • Here property testFiles is not at the good place, it should be at the same level than name

job: testsSuites: - name: my test suite testFiles: - ./sample.testgb