1

Recently I have implemented parallel selenium UI test execution by increasing Jenkins node count and creating multiple Jenkins jobs with different regression.xml files pointing to them. In a nutshell in a single server, there are multiple browser windows open and start test execution.

Previously, we use just a one Jenkins node, so any given time there will only one browser instance running in the test server.

The problem I'm having is, we are having many failures with the Parallel execution when compared to old (sequential) execution.

I believe this happens because when multiple browsers are open in the same server, element focus might be change time to time.

And I got this type of exceptions most of the time.

org.openqa.selenium.ElementClickInterceptedException: element click intercepted:

So is this the normal behavior with multiple browser test in the same server, or is this something we can fix by having a code level improvements?

6
  • Are you parallelizing your tests using selenium grid?
    – Alexey R.
    Oct 7 at 8:01
  • Also are you using thread safe driver object ?
    – PDHide
    Oct 7 at 8:04
  • @AlexeyR. No.its using Jenkins Nodes.
    – ChathuD
    Oct 7 at 8:48
  • @PDHide Im not soo sure about that. "thread safe driver object" This is the first time i heard it.
    – ChathuD
    Oct 7 at 8:49
0

creating multiple Jenkins jobs with different regression.xml files pointing to them

If each Jenkins job runs the test command but pointing to different tests then each should be spinning up its own WebDriver/Browser instance so the ElementClickInterceptedException might mean your app is in a different state than what the test code assumes. It's common that when enabling parallelism you'll find that there are assumptions on app and data states in the once sequential tests.

So is this the normal behavior with multiple browser test in the same server, or is this something we can fix by having a code level improvements?

Even in UI testing I try to follow F.I.R.S.T. principles where each test is atomic and can be ran in any order by any machine. This helps me work out assumptions on state.

0

In leading software testing solutions providers a basic and simple approach is followed to handle and avoid such failures. Below are the steps that can help you fix this issue

  1. Parallel Execution needs to be thread safe.
  2. If we are using action class then we can use other way to click like Java script execution etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.