Skip to main content
Known Participant
January 17, 2024
Question

Using Cucumber for Appian, unable to run tests in Parallel

  • January 17, 2024
  • 4 replies
  • 1 view

I am using the Cucumber for Appian package along with Junit4.

For running the tests in parallel I am using the surfire plugin parameters provided in https://cucumber.io/docs/guides/parallel-execution/?lang=java#junit-4

During execution although multiple instances of chrome browser are opening in parallel, the rest for the steps are being executed on a single browser.

Looks like each browser instance is not thread safe. Anyone faced this issue or are able to successfully run tests in parallel?

4 replies

srinivast0001
January 18, 2024

Hi Jithesh,
I think we need to specify the number of threads to run and number of java classes has to run. if any series of action has to follow like (series of approvals in the application) we need to instructions when browser need to start for series of actions

Known Participant
January 23, 2024

Can you confirm you are able to perform parallel tests successfully? And if you are using junit surefire can you share the surefire configurations?

From what I see, the appian cucumber library use a singleton instance of the browser class due to which context is shared by all the parallel tests and causes this issue.

January 24, 2024

Parallel tests running on the same browser can cause race conditions and synchronization issues. For example, actions performed by one test might not be complete before the next test starts, leading to errors or incomplete execution.

getaway shootout

kimiz
June 19, 2024

I am having similar issue, looks like the orginial cucumberforappian jar file doesn't take care of thread safe on webdriver.