Skip to content

DaoThinh96/cypress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress cucumber with application actions Circle CI Build status

This repo contains an example of automation testing written in Cypress v9 and cypress-cucumber-preprocessor package which supports BDD feature files.

The tests are written to verify basic functions of https://juice-shop.guardrails.ai website.

This project follows suggestions from App Actions approach. Refer link: Stop using Page Objects and Start using App Actions

Installation

The steps below will take you all the way through setup and running the tests. You will also need to clone the repo and have a basic understanding of Git.

1. Install Node.js

Node.js download

2. Installing node_modules

npm install

Run Test

1. Open Cypress and select a test to run

npm run cypress:open

cypress-open

2. Run all tests (headless)

npm run cypress:run

cypress-run

3. Run tests based on test type (headless)

npm run cypress:smoke-ui

npm run cypress:smoke-api

npm run cypress:regression-ui

npm run cypress:regression-api

4. Run visual tests with percy

You can run visual test with 'percy.io' follows this guide: https://docs.percy.io/docs/cypress

Below is an example of this repo:

export PERCY_TOKEN=a527c5b46ab5d1b6fe507145147a2e9b4bade97a0b6ffa08a720e38ebd520ca0

percy exec -- cypress run

percy

Generate HTML Report

After running your test scenarios, folder 'cypress/cucumber-json' will be generated along with cucumber.json results. Based on these files, you can generate a HTML summary report.

1. Generate HTML summary report

npm run generate-html-report

2. Open HTML summary report

Open 'index.html' in folder 'reports/cucumber-htmlreport.html'

html-summary-report

Help!

If you get stuck, here is more help:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published