This project investigates methods for reducing flaky test failures in Continuous Integration and Continuous Deployment (CI/CD) pipelines using Selenium WebDriver automation.
The framework compares a baseline Selenium implementation against an enhanced implementation incorporating synchronization mechanisms and retry strategies. Experimental execution was performed using GitHub Actions and Maven TestNG automation on the Demoblaze e-commerce application.
This repository supports the research conducted for a BSc Information Technology dissertation project.
Reducing Flaky Tests in CI/CD Pipelines using Selenium Automation
February 2026 – July 2026 (6 Months)
To evaluate whether automated mitigation techniques can reduce flaky test behaviour and improve test stability within CI/CD environments.
- Investigate the causes of flaky tests in Selenium automation.
- Develop a baseline automation framework without mitigation mechanisms.
- Implement mitigation strategies including:
- Explicit waits
- Retry mechanisms
- Screenshot capture
- CI/CD execution
- Compare baseline and enhanced framework performance.
- Analyse improvements in test stability and reliability.
| Technology | Purpose |
|---|---|
| Java 17 | Programming Language |
| Selenium WebDriver | Browser Automation |
| TestNG | Test Framework |
| Maven | Dependency Management |
| GitHub Actions | CI/CD Pipeline |
| ChromeDriver | Browser Driver |
| WebDriverManager | Driver Management |
| CSV Reports | Result Storage |
Website:
Tested functionalities include:
- Login
- Product Selection
- Add To Cart
- Category Navigation
- Cart Navigation
- Home Navigation
src/test/java
│
├── base
│ └── BaseTest.java
│
├── pages
│ ├── LoginPage.java
│ ├── LoginPageBaseline.java
│ └── HomePage.java
│
├── tests
│ ├── BaselineTests.java
│ ├── EnhancedTests.java
│ └── EcommerceTests.java
│
└── utils
├── WaitUtils.java
├── RetryAnalyzer.java
├── ScreenshotUtils.java
└── ExcelUtils.java
The baseline implementation executes Selenium tests without any stabilization mechanism.
Characteristics:
- No explicit waits
- No retry logic
- Higher susceptibility to timing issues
The enhanced implementation includes:
WaitUtils.waitForElement(driver, By.id("login2"));retryAnalyzer = RetryAnalyzer.classScreenshotUtils.capture(driver, "EnhancedFail");Automated execution through GitHub Actions.
git clone https://github.com/SapteshPawar/Flakytest-framework.gitcd Flakytest-frameworkmvn clean testmvn -Dtest=BaselineTests testmvn -Dtest=EnhancedTests testmvn clean test -Dheadless=trueThe project includes automated test execution using GitHub Actions.
Pipeline workflow:
GitHub Push
↓
Maven Build
↓
Selenium Test Execution
↓
CSV Result Generation
↓
Artifact Upload
Workflow file:
.github/workflows/selenium-tests.yml
Two implementations were evaluated:
| Framework | Description |
|---|---|
| Baseline | No mitigation mechanisms |
| Enhanced | Explicit waits and retry logic |
Experimental metrics collected:
- Total Test Executions
- Passed Tests
- Failed Tests
- Pass Rate
- Flakiness Rate
- Execution Time
The experimental evaluation demonstrated:
- Reduction in flaky test failures
- Improved pass rates
- Enhanced framework stability
- More reliable CI/CD execution
Result files are available in:
docs/results/
.github/
docs/
src/
pom.xml
README.md
RESEARCH.md
| Version | Description |
|---|---|
| v0.1 | Project Proposal |
| v0.2 | Framework Setup |
| v0.3 | Baseline Framework |
| v0.4 | Enhanced Framework |
| v0.5 | CI/CD Integration |
| v1.0 | Final Dissertation Submission |
The repository includes:
- Framework architecture diagrams
- GitHub Actions execution evidence
- Experimental result datasets
- Test execution screenshots
- CI/CD workflow screenshots
- Comparative analysis charts
Located in:
docs/research evidence/
- Single application under test (Demoblaze)
- Chrome browser only
- Limited project duration (6 months)
- Simulated flaky scenarios rather than enterprise-scale environments
Potential future enhancements include:
- Cross-browser testing
- Parallel execution
- Selenium Grid integration
- AI-assisted flaky test detection
- Cloud-based execution environments
Saptesh Pawar
MSc Information Systems Dissertation Project
2026
If referencing this work academically:
Pawar, S. (2026) Enhancing Web Application Testing Reliability: A Selenium-Java Automation Framework with CI/CD Integration.
MSc Information Systems Dissertation Project.
This project is licensed under the MIT License.