I have an application and I want to test individual ui elements in the application from the inside. The purpose is to verify that display controls such as labels are displaying what they should and that touches trigger the correct results.
And I don't mean any E2E tests (I will use Appium for that), I'm looking for something that would allow me to open the app in a state that I need and test one element(if it is displayed correctly and if it behaves correctly - I will probably split these two actions into two separate tests).
For example:
-
Let's say I have an app that has a "Hello" button in the middle of the screen and upon clicking on that button a new screen opens that has two other buttons. One has label "Red" the other has label "Blue". If I click on "Red" the background of the application turns red and if I click the "Blue" button the background turns blue.
-
Now I want to write separate tests that would open the app on:
-
initial screen and check the "Hello" button is there
-
initial screen and check that clicking on the "Hello" button opens new screen
-
second screen and check that there is "Red" button
-
second screen and check that upon clicking on "Red" button the screen turns red
-
and so on..
-
I don't know how to call this testing but for me it sounds like "ui unit testing"
I know this is possible on Android using Espresso so I hope it is possible on iOS too.
Aucun commentaire:
Enregistrer un commentaire