what is parallel testing
--Parallel Execution: In parallel testing multiple browsers are
invoked simultaneously and all the test scripts are executed
parallelly.
what is parallel testing
--Parallel Execution: In parallel testing multiple browsers are
invoked simultaneously and all the test scripts are executed
parallelly.
parallel testing
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>**/*Runner*.java</include>
*Runner* - any test class Contains Runner
Runner* - any test class starts with Runner
*Runner - any test class ends with Runner
PerCoreThreadCount: set false it will
try to match number of threads with number
of CPU cores. Regardsless on threadCount value.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us