mars3142
mars3142

Reputation: 2561

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).

Upvotes: 18

Views: 4790

Answers (1)

Sonam
Sonam

Reputation: 572

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.

Upvotes: 21

Related Questions