Test data issues with parallel test execution

44 views
Skip to first unread message

Sen M

unread,
Oct 19, 2017, 10:28:26 PM10/19/17
to Selenium Users
can someone share information on how you are handling the test data collision when executing multiple test cases parallel.
Our tests will make a database call as a first step to fetch the test data before executing the tests. We have this step on all our test cases.
Problem is when test cases gets executed in parallel, they end up getting same test data and trying to do different actions on the same data and it is failing.
Any suggestion to avoid this would be greatly appreciated.

Krishnan Mahadevan

unread,
Oct 20, 2017, 12:31:23 AM10/20/17
to seleniu...@googlegroups.com

Can you please show us some code that would basically give us an idea on what you are facing as problems ?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0db07153-577e-4131-8cc6-88c9a8f4bbb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gary @ Qarbon

unread,
Oct 24, 2017, 8:51:33 AM10/24/17
to Selenium Users
Hi,

Why not make copies of the test data and have each test case work on its own copy to avoid contention? The key here is understanding what is meant by "trying to do different actions on the same data and it is failing".

Regards

Gary

P.S. Is this specifically a question about Selenium?

Anne kootstra

unread,
Nov 19, 2017, 4:56:44 AM11/19/17
to Selenium Users
When creating test data as part of your test is not possible, then using a database sequence object to fetch a unique number and then use it to fetch the corresponding test data record. Because the sequence object will only return a number once, collisions in using the same test data record twice is prevented. It does mean two database interactions, but that typically isn't an issue.

Op vrijdag 20 oktober 2017 04:28:26 UTC+2 schreef Sen M:
Reply all
Reply to author
Forward
0 new messages