-
Notifications
You must be signed in to change notification settings - Fork 40
RerunFailedTests
To record information about failed test use annotation @StoreFailedResults.
@RunWith(Bobcumber.class)
@StoreFailedResults("target/failedTests.properties")
@CucumberOptions(
features = "src/test/resources/",
plugin = {"pretty", "html:target/cucumber-html-report/aem-checkbox",
"json:target/aemCheckboxTest.json"},
tags = {"@aemCheckbox", "~@disabled"},
glue = "com.cognifide.qa"
)
public class AemCheckboxTest {
}
After this, information about failed tests will be stored in provided file. You can use the same file to more than one test suite.
To rerun failed tests use standard Bobcumber runner. In cucumber features options indicate where is file with filed tests.
@RunWith(Bobcumber.class)
@CucumberOptions(
features = {"@target/failedTests.properties"},
plugin = {"pretty", "html:target/cucumber-html-report/rerun",
"json:target/rerun.json"},
glue = "com.cognifide.qa"
)
public class RerunFailedTests {
}
You can also specify, whether tests should rerun or not. Bobcumber saves statistics about failed tests, so you can specify percentage value of maximum tests to rerun. It prevents from triggering tests that works, but failed on e.g. infrastructure issue.
By default, Bobcumber stores statistics in target/testsStatisticFile.properties
file, and RerunFailedTests
runner allows maximum 10% of failed test that can be rerun.
When there's too many test failures, TooManyTestsToRerunException
exception is thrown.
To increase percentage value of maximum failed tests, simply override bobcat.report.statistics.retryPercentage
property,
or pass that parameter with maven -Dbobcat.report.statistics.retryPercentage=25
.
Feature files should be stored in project resources.
- 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