Skip to content

Cypress plugin that automatically generates smoke-like tests from a project's cypress test base

License

Notifications You must be signed in to change notification settings

woltsu/cypress-smokify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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