I would like to test one use case (scenario) of my android application. It should simulate user usage of app. Is it better to write one test method with code testing whole use case or should I create seperated methods for every part (in that case, test has to go in particular order)?
Example:
public void test() {
//click or button (open new activity)
//check if activity is opened
//open firm selection (open new activity)
....
}
or
public void test1(){
//click or button (open new activity)
//check if activity is opened
}
public void test2(){
//open firm selection (open new activity)
}
...
public void testX(){
//file at the end is created
}
What is the better approach and why?
Aucun commentaire:
Enregistrer un commentaire