Tutorial: Create Automated Tests with Chathai (Step-by-step)
1. Download or open the Playground
- Demo Web: Simple Todo App
(or use any web app you want to test)
2. Create the Excel Template
Download the example template
or create a new one following this example:
TestScenario(des) | Test case(IT) | Describe | only | hook | command | value/target |
---|---|---|---|---|---|---|
Simple Todo App | Loads the app and adds a todo | Open the site before each test in the suite | visit | http://localhost:3000 | ||
Simple Todo App | Loads the app and adds a todo | Open the site before each test in the suite | get | input[name="task"] | ||
Simple Todo App | Loads the app and adds a todo | Open the site before each test in the suite | skip | type | Learn Cypress | |
Simple Todo App | Loads the app and adds a todo | Open the site before each test in the suite | before | get | button[type="submit"] | |
Simple Todo App | Loads the app and adds a todo | Open the site before each test in the suite | click | |||
Simple Todo App | Loads the app and adds a todo | Open the site before each test in the suite | contains | Learn Cypress |
3. Generate the Cypress Script
npx chathai generate ./xlsxtemplate/chathai-templateV.1.0.0.xlsx ./cypress/e2e
4. Open the Cypress Playground
npx cypress open
Select the generated spec file and run the test.
5. View Results
- View results via Cypress UI
- Create an HTML report with
npx chathai export-report
Notes
- You can edit the Excel and re-generate anytime.
- Try changing selectors or adding more test cases.
Playground / Online Demo
- For an online playground, use StackBlitz, GitHub Codespaces or Repl.it.
Prepare a repo with Cypress and Chathai installed. - Example repo: github.com/your-org/chathai-playground