System Requirements
Before you begin, ensure your system meets these requirements:| Component | Minimum Version | Recommended |
|---|---|---|
| Java | 21 (LTS) | 21.0.3 or later |
| RAM | 4 GB | 8 GB or more |
| Disk Space | 2 GB | 5 GB (including IDE) |
| Operating System | Windows 10, macOS 10.15, Ubuntu 20.04 | Latest stable versions |
| Chrome Browser | 100+ | Latest stable |
Installing Java 21
Download Java 21
Java 21 is a Long-Term Support (LTS) release required by this framework.
- Windows
- macOS
- Linux (Ubuntu/Debian)
Download from Adoptium:
- Select OpenJDK 21 (LTS)
- Choose Windows x64
- Download the MSI installer
- Run the installer and follow the wizard
- Ensure “Set JAVA_HOME variable” is checked
Verify Java Installation
Open a new terminal and verify the installation:Expected output:Also verify the Java compiler:Expected output:
Configure JAVA_HOME (if needed)
If Java isn’t recognized, set the
JAVA_HOME environment variable:- Windows
- macOS/Linux
- Open System Properties → Environment Variables
- Add new system variable:
- Variable name:
JAVA_HOME - Variable value:
C:\Program Files\Eclipse Adoptium\jdk-21.x.x
- Variable name:
- Edit
Pathvariable and add:%JAVA_HOME%\bin - Open a new terminal to test
Gradle Setup
The Makers BTG Tests project includes Gradle Wrapper, so you don’t need to install Gradle separately. The wrapper ensures everyone uses the same Gradle version.Gradle Wrapper files (
gradlew, gradlew.bat, gradle/wrapper/) are included in the repository. These files manage Gradle installation automatically.Using Gradle Wrapper
Project Dependencies
The framework’s dependencies are managed via Gradle and defined inbuild.gradle:
build.gradle
Key Dependencies
Serenity BDD (4.0.46)
Serenity BDD (4.0.46)
Core framework providing:
- Living documentation and rich HTML reports
- Screenshot capture and step logging
- Requirements coverage tracking
- Integration with Cucumber and JUnit
Serenity Screenplay (4.0.46)
Serenity Screenplay (4.0.46)
Screenplay pattern implementation:
- User-centric test design
- Tasks, Actions, Questions
- WebDriver integration for UI testing
Cucumber (7.14.0)
Cucumber (7.14.0)
BDD framework supporting:
- Gherkin syntax for feature files
- Step definitions in multiple languages (Spanish supported)
- Scenario outlines with examples
JUnit 5 (5.10.1)
JUnit 5 (5.10.1)
Modern test engine with:
- Platform Suite API for Cucumber integration
- Parallel test execution
- Flexible test configuration
AssertJ (3.24.2)
AssertJ (3.24.2)
Fluent assertion library for:
- Readable, chainable assertions
- Rich error messages
- Type-safe validations
Downloading Dependencies
When you first run Gradle, it automatically downloads all dependencies:- Linux/macOS:
~/.gradle/caches/ - Windows:
C:\Users\<username>\.gradle\caches\
The initial download may take 5-10 minutes depending on your internet connection. Subsequent builds will be much faster as dependencies are cached.
IDE Setup
IntelliJ IDEA (Recommended)
IntelliJ IDEA provides excellent support for Java, Gradle, and Cucumber.Install IntelliJ IDEA
Download from JetBrains:
- Community Edition (free) - sufficient for this project
- Ultimate Edition (paid) - includes additional features
Open the Project
- Click Open or File → Open
- Navigate to the
mkrs-btg-testsdirectory - Select
build.gradleand click Open - Choose Open as Project
- IntelliJ will import the Gradle project automatically
Install Required Plugins
Go to File → Settings → Plugins (or IntelliJ IDEA → Preferences → Plugins on macOS):Install these plugins:
- Cucumber for Java - Gherkin syntax highlighting and navigation
- Gherkin - Feature file support
Configure Project SDK
- Go to File → Project Structure → Project
- Set SDK to Java 21
- Set Language level to “21 - Pattern matching for switch”
- Click Apply and OK
Visual Studio Code
If you prefer VS Code:Install Extensions
Install these extensions from the VS Code marketplace:
- Extension Pack for Java (Microsoft)
- Cucumber (Gherkin) Full Support
- Gradle for Java
Environment Verification
Verify your complete setup:If all steps complete successfully, your environment is ready for test development!
Chrome Browser Setup
The framework uses Chrome for UI testing with automatic driver management.Install Chrome
- Windows
- macOS
- Linux
Download from google.com/chrome and install.
Selenium Manager
The framework uses Selenium Manager for automatic ChromeDriver management. No manual driver download is needed! Configuration inserenity.conf:
Selenium Manager automatically downloads and manages the correct ChromeDriver version for your Chrome browser. This eliminates version mismatch issues.
Next Steps
Your development environment is now ready! Continue with:Quickstart Guide
Run your first test and explore the framework
Writing Tests
Learn how to create new test scenarios
Project Structure
Understand the codebase organization
Configuration
Customize the framework for your needs
Troubleshooting
Gradle sync fails in IntelliJ
Gradle sync fails in IntelliJ
- Go to File → Invalidate Caches → Invalidate and Restart
- Delete
.gradleand.ideafolders from the project - Re-import the project by opening
build.gradle
Wrong Java version is used
Wrong Java version is used
Set Or configure in IntelliJ: File → Project Structure → SDKs
JAVA_HOME explicitly:Dependencies fail to download
Dependencies fail to download
- Check internet connection
- Clear Gradle cache:
rm -rf ~/.gradle/caches/ - Retry with:
./gradlew build --refresh-dependencies - If behind a proxy, configure in
~/.gradle/gradle.properties
Chrome not found during tests
Chrome not found during tests
Ensure Chrome is installed and in your system PATH. For Linux headless environments, install Chrome or configure for remote execution.
Permission denied: ./gradlew
Permission denied: ./gradlew
Make the wrapper executable: