how to run pararalel testing maven code example
Example: parallel testing in junit
To run parallel testing in Junit
We are using maven-surefire plugin
in pom.xml file.
We can specify how many threads we
want to run as at the same time.
We also have to make some changes
in Driver class. We need to use
"ThreadLocal<WebDriver> instead of
"WebDriver" Because "WebDriver"
generates only a single WebDriver object,
but "ThreadLocal<WebDriver>" generates
multiple browser to run parallel testing.
<testFailureIgnore>TRUE</testFailureIgnore>
<parallel>METHODS</parallel>
<threadCount>40</threadCount>
<forkCount>2C</forkCount>
<perCoreThreadCount>false</perCoreThreadCount>
<include>**