Coder Social home page Coder Social logo

ayefour_corp's Introduction

Serenity/JS Cucumber Protractor Template

Build Status dependencies Status

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

You might also want to have a look at the Serenity BDD reports produced by this project.

Learn more:

Prerequisites

To use this project, you'll need:

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

Follow the installation instructions to help you verify your setup.

Usage

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

Installation

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 latest version of chromedriver and 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:[email protected]:8080/
https-proxy=http://user:[email protected]: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.

Similar instructions are available for the chromedriver module.

Execution

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

npm run lint            # runs the code linter
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

Running individual scenarios by name

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

npm run test:execute -- --cucumberOpts.name="Adding numbers"

Note that this technique works with partial matches, i.e. specifying --cucumberOpts.name="numbers" would match both scenarios in the example .feature file.

Running scenarios by tag

You can limit the number of scenarios to execute using Cucumber tags and tag expressions, for example:

npm run test:execute -- --cucumberOpts.tags="@smoke-test and @fast"

Running scenarios by file name and line number

You can also run a single scenario by specifying its exact file:line location, for example

npm run test:execute -- --specs=features/super_calculator.feature:24

Your feedback matters!

Do you find Serenity/JS useful? Give it a star! โ˜…

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

Have feedback? Let me know on twitter: @JanMolak

If you'd like to chat with fellow users of Serenity/JS, join us on Gitter Chat.

And if Serenity/JS has made your life a little bit easier, please consider sponsoring its ongoing development ๐Ÿ™‡

ayefour_corp's People

Contributors

an0ma133 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.