GithubHelp home page GithubHelp logo

proskynete / cypress-cucumber-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 414 KB

A boilerplate designed to run e2e tests using TS, Gherkins and Linter, generating a report at the end of the execution

License: GNU General Public License v3.0

JavaScript 23.34% Shell 1.29% TypeScript 71.34% Gherkin 4.03%
cypress testing cucumber dotenv eslint prettier reporting testing-library typescript gherkin test

cypress-cucumber-boilerplate's Introduction

Cypress Cucumber Boilerplate



https://img.shields.io/coverallsCoverage/github/proskynete/node-api-skeleton

Table of contents
  1. Description
  2. Getting Started
  3. How to use
  4. Folder Structure

πŸ‘€ Description

This project will allow you to have a starting point to create end-to-end tests using a very complete suite.

πŸ”

βš™οΈ Getting Started

Technologies used and that are necessary prior to installation:

  • Node JavaScript runtime (I recommend using nvm to manage multiple versions of node).
  • TypeScript TypeScript compiler.
  • Eslint TypeScript linter.
  • Cypress End-to-End testing runner.
  • Testing Library Testing utilities that encourage good testing practices.
  • Cucumber Cucumber is a tool that supports Behaviour-Driven Development (BDD).
  • Gherkin The syntax that Cucumber understands to run the tests.
  • Cucumber JSON Formatter Convert Cucumber messages into a JSON document. (Please follow the instructions to install this in your computer)
  • Multiple Cucumber Html Reporter Transform Cucumber JSON output to beautiful HTML report.

πŸ”

πŸ’ͺ How to use

Scripts Description
start:open Will open the Cypress interface to run the tests.
start Will run the tests headless.
start:report It will create the report using the information of the tests already executed.
lint It will review the syntax of the tests (step_definitions folder).
lint:fix It will fix tests that can be fixed automatically.

πŸ”

πŸ‘Ύ Folder structure

The following folder structure shows only the most important folders.

.
β”œβ”€β”€ cypress/
β”‚   β”œβ”€β”€ downloads/
β”‚   β”œβ”€β”€ e2e/
β”‚   β”‚   β”œβ”€β”€ features/                         # Features folder.
β”‚   β”‚   β”‚   β”œβ”€β”€ {domain}/                     # Domain folder.
β”‚   β”‚   β”‚   β”‚   └── {feature}.feature         # Feature 1 file.
β”‚   β”‚   β”‚   └── {domain}/                     # Domain folder.
β”‚   β”‚   β”‚   β”‚   └── {feature}.feature         # Feature 2 file.
β”‚   β”‚   └── β”œβ”€β”€ step_definitions/             # Step definitions folder.
β”‚   β”‚   β”‚   β”œβ”€β”€ {domain}/                     # Domain folder.
β”‚   β”‚   β”‚   β”‚   └── {step_definition}.cy.ts   # Step definition 1 file.
β”‚   β”‚   └── └── {domain}/                     # Domain folder.
β”‚   β”‚           └── {step_definition}.cy.ts   # Step definition 2 file.
β”‚   β”œβ”€β”€ support/
β”‚   β”‚   β”œβ”€β”€ commands.js
β”‚   β”‚   └── e2e.js
β”‚   β”œβ”€β”€ fixtures/
β”‚   β”œβ”€β”€ screenshots/                          # Folder with the screenshots of the failed tests
β”‚   β”œβ”€β”€ support/
β”‚   └── videos/                               # Folder with the videos of the failed tests
β”œβ”€β”€ jsonlogs/                                 # This folder is used to store the JSON logs generated by the tests.
β”œβ”€β”€ reports/                                  # This folder is created by the start:report command.
β”œβ”€β”€ .cypress-cucumber-preprocessorrc.json     # Configuration file for the cucumber preprocessor.
β”œβ”€β”€ cypress.config.js                         # Configuration file for the Cypress interface.
β”œβ”€β”€ generate/report/config.js                 # Configuration file for the report generator.
└── ...

πŸ”

License

GPL-3.0 - Eduardo Esteban Álvarez Castañeda

cypress-cucumber-boilerplate's People

Contributors

proskynete avatar

Stargazers

 avatar Melvin Rosales avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

thatsmrdunno

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.