0.0.3 • Published 4 years ago

cypress-smokify v0.0.3

Weekly downloads
25
License
MIT
Repository
-
Last release
4 years ago

cypress-smokify

Cypress plugin that automatically generates smoke-like tests from a project's cypress test base. By providing the percentage of tests to skip, cypress-smokify will pick file-specific arbitrary tests to run. This can be useful when a project's test base grows to such an extent that it gets cumbersome to run all tests everytime when pushing code for example. However, all tests should always be run before deploying any code.

Install & usage

  1. Install the package
npm install cypress-smokify
  1. Add it into cypress/plugins/index.js
const smokify = require('cypress-smokify')

module.exports = (on, config) => {
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config
  on('file:preprocessor', smokify(config))
}
  1. Specify the % (value between 0-1) of tests you want to skip
cypress run --env smokify=0.5 --config baseUrl=http://X:Y/ 

Run 1:

Run 1

Run 2:

Run 2