⚙️ CI/CD & Cross Browser Testing
CI/CD & Cross Browser Testing: A cypress run integrated into a CI/CD pipeline acts as a quality gate: every pull request gets tested automatically before it's merged — like a qua
A cypress run integrated into a CI/CD pipeline acts as a quality gate: every pull request gets tested automatically before it's merged — like a quality control station at the end of a factory assembly line: every measurement is taken automatically before the product goes into the box, and any unit that falls outside spec is pulled from the line before humans miss that 2% drift. But you might ask: "I run tests locally, why do I need CI as well?" Because a developer's machine is a single OS, a single browser, a single screen resolution; a CI matrix runs the same code in Chrome, Firefox, and Edge on Ubuntu simultaneously. In Java, Maven's mvn verify goal runs all tests after compilation and stops the build on failure — that's exactly cypress run's role in CI. The real QA business risk: a PR that PASSes locally but breaks on Firefox in the CI matrix, with that matrix missing or skipped, produces a silent browser-specific bug in production — discovered via customer complaints by the time anyone notices.
cypress open launches the interactive Test Runner — used during development. cypress run runs in headless mode (no visible browser) and is designed for CI environments. The --browser flag picks which browser to run: chrome, firefox, edge, or electron (the default).
GitHub Actions — basic Cypress workflow
Micro Lab: Cypress — Command chaining
Replace the TODO line with the critical line from the expected solution. This is not a real runtime; the goal is to reinforce writing the correct structure in a controlled way.
Cross Browser Matrix — parallel across 3 browsers
Step by Step: Cypress — Command chaining
Select with cy.get()
Select the target element with cy.get(locator)
Chain the action command: .click() / .type("text") / .select("option")
Cypress auto-retries — if command does not succeed within 4s it fails
Verify DOM change with .should("have.value", "text")
Run the same chain in CI with a different viewport, check responsive behavior
What is the Cypress UI interaction and verification order?