Parallel execution of different browsers

Теги: #<Tag:0x00007f790269c148> #<Tag:0x00007f790269c080> #<Tag:0x00007f790244bec0> #<Tag:0x00007f790244bdd0>

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!