dceky
v1.0.26
Published
Cypress toolkit for Harvard DCE
Readme
dceky
A Cypress-based testing framework by Harvard DCE
Getting Started
It's easy to use ky as your testing framework. To get started, follow these steps:
1. Install and Configure Cypress
Install Cypress: npm i --save-dev cypress
Configure Cypress:
- Use
npx cypress open - Choose "E2E"
- On the configuration page, simply click "Continue"
- When you get to the browser chooser, close Cypress
From this point onward, you won't run cypress directly
2. Install and Set Up Ky
Install ky: npm i --save-dev dceky
Set up ky: npm run ky:setup
You'll have a bunch of changes to commit and push. Do that now.
Using Ky
Start Ky Tests: npm run ky:start
To start running ky tests, use npm run ky:start and follow instructions.
You'll be automatically guided through a launch process where you'll choose whether tests will run visibly or headless, which profile(s) you'll use, and which browser(s) you'll use. You can also set these through environment variables or arguments. See the examples below:
// Arguments:
npm run ky:start --headless --browser=Chrome,Safari --profile=Stage// Example environment:
HEADLESS=true
BROWSER=Chrome,Safari
PROFILE=StageSetup Ky: npm run ky:setup
Whenever you update the version of ky or make changes to supporting project-specific commands or other non-test files, you should run ky:setup.
This will regenerate configuration files, typescript declarations, and other ky resources that keep your project working smoothly.
Setup and Start Ky Tests: npm run ky:dev
QA people and CI systems should start tests using npm run ky:start because that ensures that no files, dependencies, or files will be changed on run.
But, developers should run tests using npm run ky:dev because each time the tests are run, ky is automatically set up again, ensuring that ky files are up-to-date and running smoothly.
