简体   繁体   中英

Android gradle test tasks

Can someone explain the main differences between these types of Android gradle tasks?

  • check - Runs all checks.
  • connectedAndroidTest - Installs and runs the tests for Build 'debug' on connected devices.
  • connectedCheck - Runs all device checks on currently connected devices.
  • deviceCheck - Runs all device checks using Device Providers and Test Servers.

Eg if I run connectedAndroidTest and connectedCheck , it seems, that everything will be the same -> my test classes are called (on the device or emulator).

Difference between different Android gradle tasks is as follows: (Ref: http://tools.android.com/tech-docs/new-build-system/user-guide )

  • check - uses Lint to run checks. These checks include layout issues, manifest errors etc. For more detail refer http://tools.android.com/tips/lint
  • connectedCheck - uses connectedAndroidTest - Runs all checks/tests that requires a connected device or emulator. Thus, connectedAndroidTest and connectedCheck run same tests.
  • deviceCheck - Run checks only using APIs to connect to remote devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM