/serenity-js-playwright-test-template

Test your web apps with Serenity/JS and Playwright Test

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Serenity/JS Playwright Test Template

Build Status Serenity/JS on GitHub Serenity/JS on StackOverflow Contribute with Gitpod

Follow Serenity/JS on LinkedIn Watch Serenity/JS on YouTube Join Serenity/JS Community Chat Support Serenity/JS on GitHub

Use this template repository to get started with acceptance testing your web applications using Serenity/JS, Playwright and Playwright Test.

Learn more:

Usage

This repository is a GitHub template. You can use it to create a new GitHub repository, clone it to your computer.

You can also launch it in a virtual Gitpod workspace without having to install anything on your machine:

Open in Gitpod

Installation

To use this project on your machine, you'll need:

  • Node.js, a Long-Term Support (LTS) release version 16 or later - download
  • Java Runtime Environment (JRE) or a Java Development Kit (JDK) version 8 or later - download

Follow the installation instructions to help you verify your setup.

Once you have the code on your computer, use your computer terminal to run the following command in the directory where you've cloned the project:

npm ci

Running npm ci downloads the Node modules this project depends on, as well as the Serenity BDD CLI reporter jar.

Corporate networks

If your network administrators require you to use proxy servers or an internal artifact registry (Artifactory, Nexus, etc.), your development environment might require some additional configuration.

The easiest way to do it is to create an .npmrc file in your home directory:

proxy=http://user:password@host.mycompany.com:8080/
https-proxy=http://user:password@host.mycompany.com:8080/
strict-ssl=false
registry=https://artifactory.mycompany.com/artifactory/

If you encounter issues downloading the Serenity BDD CLI jar, please follow the detailed instructions in the Serenity/JS Handbook.

Execution

The project provides several NPM scripts defined in package.json:

npm run lint            # runs code linter
npm run lint:fix        # attempts to automatically fix linting issues
npm run clean           # removes reports from any previous test run
npm test                # executes the example test suite
                        # and generates the report under ./target/site/serenity
npm start               # starts a mini HTTP server and serves the test reports
                        # at http://localhost:8080

Your feedback matters!

Do you find Serenity/JS useful? Give it a ⭐ star on GitHub!

GitHub stars

Found a bug? Need a feature? Raise an issue or submit a pull request.

Have feedback? Let me know on LinkedIn or leave a comment in Serenity/JS discussions on GitHub.

And if you have any questions about the framework, or simply want to say hello to other Serenity/JS developers, join us on Serenity/JS Community Chat.

Support Serenity/JS

Serenity/JS is a free open-source framework, so we rely on our wonderful GitHub sponsors to keep the lights on.

If you appreciate all the effort that goes into making sophisticated tools easy to work with, please support our work and become a Serenity/JS GitHub Sponsor today!

LinkedIn Follow YouTube Follow GitHub Sponsors