Parallel tests using Selenium/Testng and Database

Asked

Viewed 317 times

1

I have 1165 test cases and it’s taking 36 hours to run + run it all in 3 different browsers and I’m going crazy with this delay.

My question is whether it is possible to run parallel tests using Selenium/testng and its classes need to access the same database?

I’ll try to explain it better.

Let’s say I have the class called TesteParaCartaoDeCredito, this class has several tests inside that access the database, such as create new credit card, change limits, block card and so on.

Today if I try to run in parallel, using Chrome and firefox for example, my second test case always fails, because the first browser has run the same test and already changed it there in the database (for example the first browser ran the test to lock the card and then the second browser when it runs any other, fails).

Any idea is welcome.

1 answer

1

In your parallel prowling test can you clone your base? If so you could have two bases to run in parallel. In that case one would not interfere with the other because they are pointing to different bases

Browser other questions tagged

You are not signed in. Login or sign up in order to post.