How to run testcases continuously without reinstalling app or relanuch simulator

for example, i hava a test class named simpletest, with two testcase: case1 and case2.

when i run this class using mvn test or eclipse, after case1, i will relanuch simulator and reinstall app to run case2.

i want that after case1, just relanuch app then run next case. so i can keep previous state of the app.

how i can make it ?

Are you initiating appium driver for both the test cases? If yes, then initiate driver only once for both the test cases.

thank you. i change the annotation “Before” to “BeforeClass”, so it will execute before every case.

then i add launchApp in “before” method and closeApp in “after” method. found the first method after driver initialazation, execute launchApp will fail.

org.openqa.selenium.WebDriverException: Unable to launch the app: Error: Trying to start a session but instruments is still around

it may because the app is launched after initialization.

BTW, do you know where can i find a well organized ios example, except the official one, it’s too simple