Test Overview
This test runs a simple Cypress test using the CLI. It opens the browser, visits a webpage, checks for a visible element, and verifies the page title.
This test runs a simple Cypress test using the CLI. It opens the browser, visits a webpage, checks for a visible element, and verifies the page title.
describe('Cypress CLI execution test', () => { it('Visits example.cypress.io and checks title and element', () => { cy.visit('https://example.cypress.io') cy.get('h1').should('be.visible') cy.title().should('include', 'Kitchen Sink') }) })
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts via Cypress CLI command 'npx cypress run' | Cypress test runner initializes and opens Electron browser | - | PASS |
| 2 | Browser opens and navigates to 'https://example.cypress.io' | Browser displays the example Cypress Kitchen Sink page | - | PASS |
| 3 | Finds the <h1> element on the page using 'cy.get('h1')' | The <h1> element is present and visible on the page | Check that the <h1> element is visible | PASS |
| 4 | Checks the page title includes 'Kitchen Sink' using 'cy.title().should('include', 'Kitchen Sink')' | Page title is 'Cypress Kitchen Sink' | Verify page title contains 'Kitchen Sink' | PASS |
| 5 | Test completes and Cypress CLI reports test results | Test suite finished with all tests passing | - | PASS |