tezvyn:

What is the difference between test and androidTest source sets?

Source: developer.android.combeginner

This tests understanding of test environments. OUTLINE: Say test runs on the JVM for unit tests mocking Android classes, while androidTest runs on device for instrumented tests. RED FLAG: Saying both need a device or treating them interchangeably.

This tests whether you understand the boundary between local JVM tests and on-device instrumented tests. ANSWER OUTLINE: First, explain that test runs on your workstation JVM for fast unit tests using mocked Android classes or Robolectric. Second, explain that androidTest runs on a device or emulator with access to the real Android framework and is used for integration and UI tests. RED FLAG: Claiming the only difference is folder naming, or stating that local unit tests require a connected device.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

What is the difference between test and androidTest source sets? · Tezvyn