The test state pattern allows Wix to automatically detect, retry and quarantine flaky tests to minimize false positives. In this presentations we describe how Wix manages to run thousands of Selenium tests every day at a very high level of stability by utilizing the test state pattern including the architecture of the solution, code examples and implementation tips.
This presentation was given by Roi Ashkenazi as part of Selenium Israel Meetup #17 which was held in Wix at 11.9.16.
25. @Override
public void beforeTest(Description description) {
TestState state = getTestState(description);
if (isBetaTestInReleaseRunMode(description, state) ||
isNonBetaTestInBetaRunMode(description, state)) {
TestUtils.ignoreTest();
}
}
Run tests according to their state
34. API Core Web
DB
Web View
Java Client
Test Observer
- testStarted
- testIgnored
- testFailed
- testPassed
35. Test
- Name*
- State**
- Creation date
- Update date
- Annotations
Object modeling
Run Result
- Test Name
- Passed / failed
- Creation date
- Configuration***
1 n