Search code examples
seleniumjunitappium

Appium driver running multiple tests at once?


Can a single instance of AppiumDriver run multiple different tests at once?

I have two tests in a single class like so:

public class mainTest {


    @Test 
    public void mainMenu(){

    }

    @Test 
    public void goToViews() {

    }


}

Can a single driver instance run both of these tests (which are on a native app) at the same time (concurrently)? Or would I need a separate driver instance for each test?


Solution

  • The answer is NO

    If you want to run tests in parallel, you need a unique Appium session for each concurrent test and it means you need to have Appium driver instances as much, as you have tests in parallel.

    The good part is that you can have multiple Appium sessions on single Appium server instance.