Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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

like image 438
mars3142 Avatar asked Jan 26 '15 09:01

mars3142


1 Answers

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.
like image 178
Sonam Avatar answered Oct 16 '22 15:10

Sonam