Skip to content

Repository files navigation

QA Pulse by SK

🌲 QA Pulse by SK β€” Cypress Boilerplate

A production-grade, community-ready Cypress 13 test automation framework Fork it. Clone it. Ship quality code faster.


Cypress Tests License: MIT Node.js Cypress TypeScript PRs Welcome


🌐 www.skakarh.com  |  🏒 QAPulse-by-SK  |  ⭐ Star this repo if it helped you!


🌿 Choose Your Branch

Branch Description Clone Command
βœ… master ← You are here TypeScript β€” core boilerplate git clone https://github.com/QAPulse-by-SK/cypress-boilerplate.git
🟑 javascript JavaScript β€” same features git clone -b javascript https://github.com/QAPulse-by-SK/cypress-boilerplate.git
πŸ”΅ with-packages JS + QAPulseSK packages git clone -b with-packages https://github.com/QAPulse-by-SK/cypress-boilerplate.git

⚠️ Branches are independent β€” never merged. See BRANCHES.md


πŸ“¦ QAPulseSK Packages (with-packages branch)

Switch to the with-packages branch to see all 3 QAPulseSK packages integrated with 48 passing tests against real-world sites including SuiteCRM.

Package What It Does
qapulsesk-assert Fuzzy assertions, schema validation, cross-framework API
qapulsesk-gen HAR β†’ tests, recordings β†’ tests, plain English β†’ tests


✨ Features At A Glance

Category What's Included
πŸ—οΈ Architecture Page Object Model Β· BasePage Β· 12 Custom Commands
🌐 E2E Testing Chrome · Firefox · Edge · Electron
πŸ”Œ API Testing ApiHelper class + cy.apiGet/Post/Put/Delete
πŸ“Έ Visual Regression Screenshot baselines Β· full-page + element
β™Ώ Accessibility cypress-axe Β· A11yHelper Β· WCAG 2.1 AA Β· keyboard Β· ARIA Β· labels Β· contrast
🧩 Component Testing Cypress CT with React support
πŸ“Š Reporting Mochawesome + Allure + JSON + Custom Terminal Summary
🏷️ Test Tags cypress-grep · @smoke @regression @sanity @critical @e2e @api @visual @a11y
πŸ” CI/CD GitHub Actions (multi-browser + Pages + PR comments) Β· Jenkins Β· Azure DevOps
πŸ” Auth cy.session() β€” login once, reuse across all tests
🌐 Network cy.intercept() · API mocking · request spying
πŸ›‘οΈ Code Quality ESLint Β· Prettier Β· TypeScript strict
πŸͺ΅ Logging cy.logStep() + structured logger

πŸ“ Project Structure

cypress-boilerplate/
β”œβ”€β”€ πŸ“‚ .github/workflows/cypress.yml    # Multi-browser CI + GitHub Pages
β”œβ”€β”€ πŸ“‚ ci/
β”‚   β”œβ”€β”€ Jenkinsfile
β”‚   └── azure-pipelines.yml
β”œβ”€β”€ πŸ“‚ cypress/
β”‚   β”œβ”€β”€ e2e/
β”‚   β”‚   β”œβ”€β”€ auth/login.cy.ts
β”‚   β”‚   β”œβ”€β”€ home/home.cy.ts
β”‚   β”‚   └── advanced/advanced.cy.ts     # Intercepts, data-driven, alerts, drag-drop
β”‚   β”œβ”€β”€ api/posts.cy.ts
β”‚   β”œβ”€β”€ accessibility/home.a11y.cy.ts
β”‚   β”œβ”€β”€ visual/home.visual.cy.ts
β”‚   β”œβ”€β”€ component/NavBar.cy.ts
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ BasePage.ts
β”‚   β”‚   └── example/
β”‚   β”‚       β”œβ”€β”€ HomePage.ts
β”‚   β”‚       └── LoginPage.ts
β”‚   β”œβ”€β”€ support/
β”‚   β”‚   β”œβ”€β”€ commands.ts                 # 12 custom commands
β”‚   β”‚   β”œβ”€β”€ e2e.ts
β”‚   β”‚   β”œβ”€β”€ component.ts
β”‚   β”‚   └── index.d.ts                  # TypeScript declarations
β”‚   β”œβ”€β”€ helpers/
β”‚   β”‚   β”œβ”€β”€ a11yHelper.ts               # 9 accessibility methods
β”‚   β”‚   β”œβ”€β”€ apiHelper.ts
β”‚   β”‚   └── randomData.ts
β”‚   β”œβ”€β”€ constants/index.ts
β”‚   β”œβ”€β”€ types/index.ts
β”‚   β”œβ”€β”€ utils/logger.ts
β”‚   └── fixtures/
β”‚       β”œβ”€β”€ users.json
β”‚       └── posts.json
β”œβ”€β”€ πŸ“‚ docs/
β”‚   β”œβ”€β”€ ARCHITECTURE.md
β”‚   β”œβ”€β”€ REPORTING.md
β”‚   β”œβ”€β”€ ACCESSIBILITY.md
β”‚   └── CUSTOM-COMMANDS.md
β”œβ”€β”€ πŸ“‚ reporters/
β”‚   β”œβ”€β”€ mergeMochawesome.js
β”‚   └── jsonSummary.js
β”œβ”€β”€ cypress.config.ts
β”œβ”€β”€ tsconfig.json
└── README.md

πŸš€ Quick Start

git clone https://github.com/QAPulse-by-SK/cypress-boilerplate.git
cd cypress-boilerplate
npm install
cp .env.example .env
npm test

πŸ§ͺ Running Tests

npm run cy:open          # Open Cypress UI
npm test                 # Run all (Chrome)

# By browser
npm run test:chrome
npm run test:firefox
npm run test:edge

# By type
npm run test:e2e
npm run test:api
npm run test:visual
npm run test:a11y

# By tag (cypress-grep)
npm run test:smoke
npm run test:regression
npm run test:critical

npm run test:headed      # Watch in browser

πŸ”§ Custom Commands

cy.loginAs("admin")                           // Session-based login
cy.loginWithCredentials("user", "pass")       // Explicit credentials
cy.logout()

cy.apiGet("/posts")                           // API commands
cy.apiPost("/posts", { title: "Test" })
cy.apiPut("/posts/1", { title: "Updated" })
cy.apiDelete("/posts/1")

cy.checkA11yFull()                            // Full WCAG 2.1 AA scan
cy.checkA11yCritical()                        // Critical only

cy.interceptApi("GET", "**/posts", "posts")   // Network mock
cy.waitForNetworkIdle()

cy.dataCy("my-element")                       // Selector helpers
cy.getByRole("button", { name: "Submit" })

cy.clearAllCookiesAndStorage()
cy.logStep("My step description")

See docs/CUSTOM-COMMANDS.md for full reference.


πŸ“Š Reporting

npm run report:mochawesome   # Beautiful HTML report
npm run report:allure        # Allure dashboard
npm run report:json          # Terminal summary

β™Ώ Accessibility

import { A11yHelper } from "../helpers/a11yHelper";

A11yHelper.assertNoViolations()
A11yHelper.assertNoCriticalViolations()
A11yHelper.assertComponentAccessible("nav")
A11yHelper.assertImagesHaveAltText()
A11yHelper.assertFormLabels()
A11yHelper.assertSingleH1()
A11yHelper.assertAriaLandmarks()
A11yHelper.assertKeyboardNavigable()

βš™οΈ Environment Variables

Variable Default Description
BASE_URL https://the-internet.herokuapp.com E2E target
BRAND_URL https://www.skakarh.com Visual/a11y site
API_BASE_URL https://jsonplaceholder.typicode.com API base
TEST_USERNAME tomsmith Login username
TEST_PASSWORD SuperSecretPassword! Login password

πŸ” CI/CD

  • GitHub Actions β€” Multi-browser Β· GitHub Pages Β· PR comments
  • Jenkins β€” ci/Jenkinsfile
  • Azure DevOps β€” ci/azure-pipelines.yml

🀝 Contributing

See CONTRIBUTING.md Β· BRANCHES.md


πŸ“„ License

MIT Β© QA Pulse by SK


Built with ❀️ by QA Pulse by SK

🌐 skakarh.com  ·  🏒 QAPulse-by-SK  ·  ⭐ Star if it helped!

Created by QA Pulse by SK Β· skakarh.com

About

Production-grade Cypress 13 test automation boilerplate by QA Pulse by SK. POM, API, Visual, A11y, Custom Commands, CI/CD ready. Fork & start testing!

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages