To write an efficient test, certain steps should be followed, based on the AAA pattern discussed earlier:
- Configure and start the application (Arrange): We need not write this step because that part is already taken care of in the BeforeEachTest() method:
- Perform an interaction with some element on the screen (Act): We'll have to write code to enter text or tap on the CALL button
- Verify the desired output (Assert): We need code to verify the interaction gives us the desired output
As we can see, the first step of the test is already done, and now we need to write the next steps, which include performing interaction with the CALL button and then verifying the desired output.