Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Serenity/JS with Mocha, ideal for REST/HTTP API-level testing

NotificationsYou must be signed in to change notification settings

serenity-js/serenity-js-mocha-template

Repository files navigation

Build StatusSerenity/JS on GitHubSerenity/JS on StackOverflowContribute with Gitpod

Follow Serenity/JS on LinkedInWatch Serenity/JS on YouTubeJoin Serenity/JS Community ChatSupport Serenity/JS on GitHub

Use thistemplate repositoryto get started with acceptance testing your REST/HTTP APIs usingSerenity/JS andMocha.

Learn more:

Usage

This repository is a GitHub template. You can use it tocreate 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, 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 11 or later -download

Follow theinstallation 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

Runningnpm ci downloads theNode modules this project depends on, as well as the latest version ofchromedriver and theSerenity 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=falseregistry=https://artifactory.mycompany.com/artifactory/

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

Similar instructions are available for thechromedriver module.

Execution

The project provides severalNPM scripts defined inpackage.json:

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

Running individual scenarios by name

To execute only those scenarios which names match a given pattern, run:

npx mocha --grep="multiple expressions"

To learn more about available options, run:

npx mocha --help

Your feedback matters!

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

GitHub stars

Found a bug? Need a feature? Raisean issueor submit a pull request.

Have feedback? Let me know onLinkedIn or leave a comment inSerenity/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 onSerenity/JS Community Chat.

Support Serenity/JS

Serenity/JS is a free open-source framework, so we rely on ourwonderful 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 andbecome a Serenity/JS GitHub Sponsor today!

LinkedIn FollowYouTube FollowGitHub Sponsors

About

Serenity/JS with Mocha, ideal for REST/HTTP API-level testing

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp