Skip to main content

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:

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):

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:

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:

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: