-
Notifications
You must be signed in to change notification settings - Fork 40
Working with multiple threads
You can execute your tests in parallel from both jUnit and Cucumber approaches
There are two things that you need to do to run tests in parallel:
- tell Bobcat in how many threads it should run the tests,
- provide a test suite that supports multi-threading
You can use a property to define number of threads. Add the following line to one of your property files:
thread.count=3
If you run your tests from the command line (for example in Jenkins), you can also define number of threads from command line:
mvn clean test -PsomeProfile -Dthread.count=3
For this to work, you need following line in your POM, in Surefire's configuration section:
<thread.count>${thread.count}</thread.count>
ConcurrentSuite
runner will run all test methods from one test class in one thread, in sequence.
@Modules(GuiceModule.class)
@RunWith(ConcurrentSuite.class)
@Suite.SuiteClasses({
// some classes
})
public class MySuite {
// empty
}
To run Cucumber tests in parallel you should define fork.count
configuration option for your test suite. This option can be defined under maven-surefire-plugin
configuration in pom.xml file as shown below:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<forkCount>${fork.count}</forkCount>
<systemPropertyVariables>
<webDriver.type>${webDriver.type}</webDriver.type>
<configuration.paths>${configuration.paths}</configuration.paths>
<content.path>${content.path}</content.path>
</systemPropertyVariables>
</configuration>
</plugin>
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial