Parallel execution of different browsers

Hi all.
I have setUp class like this:

@Parameters({"browserType"})
    @BeforeClass
    @Override
    public void setUp(String browserType) {
        switch (browserType) {
            case "edge":
                Configuration.browser = "edge";
                break;

            case "firefox":
                Configuration.browser = "firefox";
                break;

            case "safari":
                Configuration.browser = "safari";
                break;

            case "chrome":
            default:
                Configuration.browser = "chrome";
                break;
        }
        Configuration.remote = HUB_URL;
        Configuration.timeout = 30000;
        Configuration.startMaximized = true;
    }

How can I run my tests in different browsers (firefox and chrome for example) at the same time?
I know that Configuration.browser is static

So what is the question then? :slight_smile:

Yes, you can run tests in different browsers in parallel threads, but changing Configuration.browser is one thread may affect other threads if they are opening their browsers at the same moment.

See from 54:17 here:

1 лайк

Thanks a lot!