Serenity/JS is a Node.js module. To help you ensure maximum stability, it relies on a recent, >= 6.9.x Long-Term Support (LTS) version of the Node.js platform.

You can get both Node.js and the Node Package Manager (npm) either from the website, which provides convenient installers for all the major operating systems, or using the Node Version Manager (nvm), which is more appropriate if you need to work with several versions of the Node.js platform simultaneously.

Check if your machine is set up correctly with these terminal commands:

$> node --version
$> npm --version

A Node.js project

Serenity/JS is typically installed as a dev dependency of a Node.js project, so that it doesn't get accidentally bundled together with your production dependencies.

If you're introducing Serenity/JS to an existing project you can skip this section as its purpose is to help you create package.json - a Node.js project descriptor file, which would already be part of your project.

To create a Node.js project from scratch, create a new directory, such as guide-to-serenity, and initialise a new project accepting the default configuration suggested by the npm with these terminal commands:

$> mkdir guide-to-serenity
$> cd guide-to-serenity
$> npm init

Your actions should result in a basic package.json file appearing under guide-to-serenity, with contents similar to the following:

  "name": "guide-to-serenity",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "author": "",
  "license": "ISC"

Java Runtime Environment

Serenity/JS delegates the work of generating the illustrated HTML reports to Serenity BDD, which is a Java library and therefore requires a Java Runtime Environment (JRE), which you can download from the website

To verify that you have Java 7 or newer installed, run the below terminal command:

$> java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

If you're working with several versions of the Java platform simultaneously, please make sure that you point your JAVA_HOME environmental variable to the correct version.

On MacOS this could be:

$> echo $JAVA_HOME

Please consult the Oracle documentation for more details.

A web browser

To automate acceptance tests of a web interface, you'll also need a web browser. Google Chrome is a great one to start with.

Your feedback matters!

Suggest features and improvements on github, get in touch on twitter, and if you found Serenity/JS useful - don't forget to give it a star! ★


results matching ""

    No results matching ""