Serenity/JS Installation Guide
Serenity/JS integrates your favourite automation tools into a cohesive platform and gives you a consistent Screenplay Pattern-based API to implement multi-actor, multi-interface test scenarios and generate rich, illustrated reports.
This guide helps you install the core runtime dependencies and prepare your development environment for writing and running Serenity/JS test scenarios. Once you have the development environment set up, follow your test runner's dedicated configuration guide to create a new project or add Serenity/JS to your existing codebase.
Quick start 🚀​
To start testing immediately, consider using:
- Serenity/JS Project Templates - pre-configured with essential dependencies
- Serenity/JS GitPods - ready-to-use cloud-based environments
Installing Node.js​
Serenity/JS runs on Node.js and supports recent Long-Term Support (LTS) versions. It is tested with Node.js 18.12, 20, and 22.
Downloading Node.js​
To install Node.js and the Node Package Manager (npm):
- Recommended: Download the installer from nodejs.org
- Advanced: Use Node Version Manager (nvm) to manage multiple versions of Node.js on a single machine
Verifying the installation​
Run the following command in your terminal:
node --version
Expected output (example):
v22.14.0
Installing the JRE​
Serenity/JS uses Serenity BDD to generate the illustrated HTML reports. Serenity BDD is a Java library and requires the Java Runtime Environment (JRE) version 17 or newer.
Downloading JRE​
To install the JRE:
- Recommended: Download the installer from oracle.com or adoptopenjdk.net
- Advanced: Use the Software Development Kit Manager (SDKMan) to manage multiple Java versions on a single machine
Verifying the installation​
Run the following command in your terminal:
java -version
Expected output (example):
openjdk version "22" 2024-03-19
OpenJDK Runtime Environment Corretto-22.0.0.36.2 (build 22+36-FR)
OpenJDK 64-Bit Server VM Corretto-22.0.0.36.2 (build 22+36-FR, mixed mode, sharing)
If you use multiple Java versions, ensure JAVA_HOME
environment variable points to the correct one. On macOS, it could be:
echo $JAVA_HOME
/Users/jan/.sdkman/candidates/java/current
Installing an IDE​
Serenity/JS supports open standards and works with all the popular JavaScript and TypeScript editors and Integrated Development Environments (IDEs).
Learn more about Serenity/JS integration with your favourite IDE:
Setting up CI/CD integration​
Serenity/JS is designed to work with Continuous Integration (CI) and Continuous Delivery (CD) systems.
Learn how to configure Serenity/JS with your CI/CD system of choice:
Need help?​
If you encounter issues during setup, try these resources:
- Serenity/JS Project Templates
- Reference implementations
- Serenity/JS Q'n'A forum
- Serenity/JS Community chat
The Serenity/JS Community is here to support you!
Next step - set up your test runner​
You're now ready to set up your Serenity/JS project! 🎯
Follow your chosen test runner's dedicated installation and configuration guide to create a new project or add Serenity/JS to your existing codebase: