简体   繁体   中英

How to run tests in android

I am using Robotium Solo to test the app

since I'm fairly new to app test, and Robotium

I have 3 methods in my test case - however, I want to run those tests, under certain conditions otherwise they fail

I can do that if i write the entire test in one method, but i don't want to run it in one method, I want to separate it into 3 methods

how do I make sure that the tests run only if I called the test methods, and not one after the other

In Robotium Test Application, every public method starting with keyword 'test' will be considered as one test case. So, you can try using 2-3 methods with names starting by keyword test.( eg testA(), testB() etc.)

So, even if testA() fails, automation testing will continue to run for testB(). And results will be shown to the JUnit viwe.

Note:- the test cases are executed in the alphabetical order as per their names.

Hope this helps , ask if you are stuck somewhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM