0

Does Selenium Grid always run Features in parallel and always run Scenarios in series? Can you specify that certain features run in series or that certain scenarios run in parallel? I am just interested in understanding the flexibility and the rules/constraints.

Tried finding this information online. Selenium Grid can be customized, but not sure about customization that tells the grid what should run in parallel and what should run in series (some thing have to run in series if there is a dependency between tests ... ideally, there would be no dependencies between tests).

Some info found online:

Selenium Grid allows a lot of flexibility with by using a json configuration file: Creating a JSON configuration file

In addition to the json configuration file, you can do additional customization using custom servlets: Custom Servlets

However, couldn't find any information about how Selenium-Grid knows what parts of the test (features/scenarios/steps) need to be run in parallel.

enter image description here

Fractal
  • 1,748
  • 5
  • 26
  • 46

2 Answers2

1

If you want different series of testing scenarios, you can create test suites with testng or junit, that will guarranty the specific orders for some scenarios.

The intent of selenium-grid is to run tests in parallel in nodes, but if you do not want to run in parallel, I think that the approach is use just one node

Pedro Henrique
  • 609
  • 2
  • 9
  • 26
  • I want to run in parallel for the most part. But wanted to know how Selenium Grid knows what should be run in parallel. Does it always run Features in parallel and then the scenarios within a feature will always be run in series? – Fractal Aug 06 '19 at 21:31
1

Selenium-Grid executes the "test" tags defined in your testng.xml in parallel. So if you want your test cases to be executed in parallel, design your testng.xml in such a way that it has an individual "test" opening and closing tag for each of the test case.

Richa
  • 11
  • 1