I'm trying to automate Android testing using Appium. What I want to do is like:
My Test Suite:
Test case 1:
Starting from Activity A
Do something
Test case 2:
Starting from Activity A
Do something
The problem is that if you go to another Activity while performing test case 1, you need to somehow navigate back to the first Activity.
At first I've tried manually going back.
My Test Suite:
Test case 1:
Starting from Activity A
Do something (<- this takes you to Activity B)
Navigate back to Activity A
Test case 2:
Starting from Activity A
Do something
But if the case fails on the step Do something
, Navigate back to Activity A
won't execute. What would be the best practice?
- Separate cases into suites?
Navigate back to Activity A
onafterEach
block?- Or anything better?
This won't make any significant differences, but I'm using Appium + Jest + WebdriverIO.