Home » Android » android – How to use the deviceCheck task to run tests on remote devices

android – How to use the deviceCheck task to run tests on remote devices

Posted by: admin May 14, 2020 Leave a comment

Questions:

On http://tools.android.com/tech-docs/new-build-system/user-guide, the following tasks are defined:

  • assemble The task to assemble the output(s) of the project
  • check The
    task to run all the checks.
  • connectedCheck Runs checks that requires a
    connected device or emulator. they will run on all connected devices
    in parallel.
  • deviceCheck Runs checks using APIs to connect to remote
    devices. This is used on CI servers.
  • build This task does both
    assemble and check
  • clean This task cleans the output of the project

I am now setting up a Jenkins CI to run my (Espresso) tests and the deviceCheck task description seems related to that. But I couldn’t find any further documentation or examples on how to use this task on CI server to execute the tests on a remote device. Does anyone know how to use it?

How to&Answers:

I would recommend running the tests with: Spoon. It’s easy to setup, has lots of nice out of the box features. e.g. good test reports, screenshots ++.

I am using it on my Jenkins CI, and it works really well! I have connected multiple devices to the CI-server, and the tests runs on all of them.