Common Issues
This guide addresses the most frequently encountered issues when working with the Makers BTG Tests framework. Each section provides diagnostic steps and proven solutions.Before troubleshooting, ensure you’re using Java 21 and have the latest dependencies from
build.gradle.WebDriver and Browser Issues
Chrome browser not starting
Chrome browser not starting
Symptoms:
- Error:
SessionNotCreatedException: Could not start a new session - Chrome process fails to launch
- Timeout waiting for browser
-
Verify Chrome Installation
Ensure Chrome is installed and accessible.
-
Update ChromeDriver via Selenium Manager
Serenity 4.0.46 uses Selenium Manager which handles driver management automatically. If issues persist:
Selenium Manager will re-download the correct driver on next run.
-
Check for Port Conflicts
If port is occupied, kill the process or configure a different port in your WebDriver setup.
-
Run in Headless Mode (for CI/CD)
Add to
serenity.properties:
WebDriver version mismatch
WebDriver version mismatch
Symptoms:
- Error:
SessionNotCreatedException: This version of ChromeDriver only supports Chrome version X - Browser opens but fails to connect
- Let Selenium Manager Handle It The framework uses Selenium Manager (built into Selenium 4.6+) which automatically downloads the correct driver version.
-
Update Chrome Browser
-
Force Selenium Manager Refresh
ElementNotInteractableException
ElementNotInteractableException
Symptoms:
- Error:
ElementNotInteractableException: element not interactable - Element is present but cannot be clicked
-
Wait for Element to be Clickable
-
Scroll Element into View
-
Check for Overlaying Elements
Overlays, modals, or loading spinners may block interaction. Wait for them to disappear:
Test Execution Issues
Step definition not found
Step definition not found
Symptoms:
- Error:
Undefined. Implement missing steps - Cucumber cannot match Gherkin steps to Java methods
-
Verify Glue Path Configuration
In
CucumberRunner.java:Ensure this matches your step definition package. -
Check Step Definition Annotation
Verify the Gherkin text exactly matches the annotation:
-
Import Correct Cucumber Annotations
-
Rebuild the Project
Test not found or not executed
Test not found or not executed
Symptoms:
- Tests don’t run when executing
./gradlew test - Gradle reports 0 tests executed
-
Check Tag Filtering
Verify tag configuration in
CucumberRunner.java:Ensure your scenarios have the@testtag: -
Verify Feature File Location
Feature files must be in
src/test/resources/features/: -
Check JUnit Configuration
In
build.gradle, verify: -
Run with Verbose Output
This reveals why tests are being filtered or skipped.
ParameterizedTest not executing with examples
ParameterizedTest not executing with examples
Symptoms:
Esquema del escenario(Scenario Outline) runs 0 times- Examples table data not being used
-
Verify Examples Table Syntax
Note: Use
Ejemplos:(Spanish) notExamples: -
Check Language Declaration
Ensure feature file starts with:
-
Validate Parameter Names Match
Parameter names in
<>must match table headers exactly.
Build and Dependency Issues
Gradle build fails
Gradle build fails
Symptoms:
- Error:
Could not resolve dependencies - Build fails with compilation errors
-
Clean and Rebuild
-
Check Java Version
Must be Java 21 (as specified in
build.gradle): -
Verify Gradle Wrapper
If issues persist, regenerate wrapper:
-
Clear Gradle Cache
Java version mismatch
Java version mismatch
Symptoms:
- Error:
Unsupported class file major version - Error:
java.lang.UnsupportedClassVersionError
-
Install Java 21
-
Set JAVA_HOME
-
Use Gradle Toolchain
The
build.gradleis configured to use Java 21 toolchain, which Gradle will automatically download if needed:
Dependency conflicts
Dependency conflicts
Symptoms:
- Error:
NoSuchMethodErrororClassNotFoundException - Tests fail with unexpected errors after dependency updates
-
Review Dependency Tree
Look for conflicting versions of the same library.
-
Use Serenity BOM
Ensure consistent Serenity versions:
-
Force Dependency Version
If a transitive dependency causes issues:
Serenity Report Issues
Serenity reports not generating
Serenity reports not generating
Symptoms:
- No
target/site/serenitydirectory after test execution - Reports are empty or incomplete
-
Verify Serenity Plugin Configuration
In
build.gradle: -
Ensure aggregate Task Runs
In
build.gradle:Or run manually: -
Check for Test Execution
Reports only generate if tests actually run. Verify tests executed:
-
Verify Serenity Reporter Plugin
In
CucumberRunner.java:
Reports show 'No requirements' or empty feature list
Reports show 'No requirements' or empty feature list
Symptoms:
- Serenity reports generate but show no features or requirements
- Test results are not associated with features
-
Configure Requirements Base Directory
In
build.gradle: -
Verify Feature File Structure
Feature files must have proper structure:
-
Check testRoot Configuration
In
build.gradle:
Getting More Help
Serenity BDD Documentation
Official Serenity BDD documentation and guides
Cucumber Documentation
Cucumber reference and best practices
Selenium Documentation
WebDriver and browser automation guides
Gradle Documentation
Build configuration and troubleshooting