Prerequisites
Before running tests, verify that the following are installed and available on yourPATH:
| Requirement | Minimum version | Check command |
|---|---|---|
| Java (JDK) | 21 | java -version |
| Maven | 3.x | mvn -version |
| Google Chrome | Latest stable | google-chrome --version or check Help → About |
Selenium 4 includes a built-in driver manager that downloads the matching
chromedriver binary automatically. You do not need to download or configure chromedriver manually.Running all smoke tests
The default configuration inTestRunner.java runs all scenarios tagged @smoke:
maven-surefire-plugin, which runs TestRunner via TestNG. ChromeDriver starts, the browser opens, and each scenario executes in sequence.
Running with a custom tag filter
Override the tag filter at runtime using thecucumber.filter.tags system property:
Understanding TestRunner
src/test/java/runners/TestRunner.java is the entry point for the test suite:
runners/TestRunner.java
| Option | Value | Purpose |
|---|---|---|
features | classpath:features | Points to src/test/resources/features/ |
glue | steps, hooks | Packages scanned for @Given/@When/@Then and @Before/@After |
tags | @smoke | Default tag filter; overridable at runtime |
plugin | pretty + Allure | Console output format and Allure result generation |
Test output
Console (Surefire)
During the run,pretty plugin prints each scenario and step result to the console:
BUILD SUCCESS line at the end means all scenarios passed.
Allure results directory
After each run, raw test data is written totarget/allure-results/. This directory is read by the Allure CLI or Maven plugin to generate the HTML report. See Allure reports for the full workflow.
Cross-platform notes
- Unix / macOS
- Windows
pom.xml).Common issues
ChromeDriver version mismatch error
ChromeDriver version mismatch error
Selenium 4 manages drivers automatically, but if you see a version mismatch, make sure you are using Selenium 4.18.1 or newer (set in
pom.xml) and that Chrome is up to date.BUILD FAILURE: No tests were run
BUILD FAILURE: No tests were run
This usually means the tag filter returned no matching scenarios. Check that at least one scenario in your feature files is tagged with the tag you specified.
AspectJ weaver not found
AspectJ weaver not found
Allure requires the AspectJ weaver JAR, which Maven downloads on the first run. If the build fails with a
javaagent error, run mvn dependency:resolve first to populate the local repository.