Testing Flashcards
Define the 3 types of testing…
Which library is implemented for testing?
Android Testing Support Library (now AndroidX).
What are tests grouped in?
Source Set
What is the Source Set of Instrumented Tests called?
androidTest.
Define each of the 5 testing annotations…
@RunWith -> Specifies the testing library to run.
@Before, After -> What to execute before and after the test is completed.
@Test -> Used above a testing method.
@Rule -> Specify the context of the test.
@Small, Medium, Large -> Specify resources to use.
What are Instrumented Tests? When should they be used?
A type of testing that enables component integration testing through user interaction simulations. The tests ensure that the application acts in an expected way upon specific user interactions.
Give 4 key points of Instrumented Tests…
- Test component integration via simulation user interaction events.
- Testing is done at runtime on an emulator or device.
- Implemented by Android Testing Support Library.
- Executed by Test Runners, which provide feedback and debugging on the test.
What are the 3 steps to testing Views?
1) Locate the View -> onView(withId…)
2) Simulate event -> .perform( )
3) Checking conditions -> .check( )