PAPracticeAutomation
Cy

JavaScript ยท Cypress

Cypress

A developer-friendly test runner that lives in the browser next to your app. Chainable commands with built-in retries, time-travel debugging, cy.intercept for network control and a great interactive runner.

Automatic retries on every queryTime-travel runnercy.intercept & cy.sessionCustom commands

Pick a practice track

Two complete apps to automate end to end, plus focused element-handling recipes โ€” all in Cypress.

๐Ÿ›๏ธNova Shop

E-commerce app

Login with test users, search/filter/sort products, cart & coupons, a validated checkout, a declined card and order history.

  • โœ“3 test accounts incl. locked & slow
  • โœ“Cart maths, coupons, tax & shipping
  • โœ“Form validation + payment failure
๐ŸŽฌShowTime

Ticket booking app

Pick city, date and showtime, select seats on a live seat map, add snacks, apply promos and pay with an OTP step under a hold timer.

  • โœ“Seat map with tiers & limits
  • โœ“Countdown timer & clock mocking
  • โœ“OTP modal, async UPI, cancellations
๐Ÿงฉ50+ challenges

Elements handling

Focused recipes for inputs, dropdowns, tables, alerts, frames, windows, drag & drop, uploads, hover, waits, shadow DOM and keys.

  • โœ“15 copy-ready recipes
  • โœ“Each linked to a live challenge
  • โœ“Tool-specific gotchas called out

1. Set up

Run this site locally with npm run dev โ€” examples target http://localhost:3000.

Terminal
npm install -D cypress
npx cypress open

// cypress.config.js
//   e2e: { baseUrl: 'http://localhost:3000' }

// cypress/support/commands.js
Cypress.Commands.add('getByTestId', (id, options) =>
  cy.get(`[data-testid="${id}"]`, options));

2. Your first test

Sign in to Nova Shop and assert the product grid loaded.

first.cy.js
describe('Nova Shop login', () => {
  it('lets demo_user sign in', () => {
    cy.visit('/shop');
    cy.getByTestId('username').type('demo_user');
    cy.getByTestId('password').type('Demo@123');
    cy.getByTestId('login-button').click();

    cy.location('pathname').should('eq', '/shop/products');
    cy.getByTestId('product-card').should('have.length', 12);
  });
});

Official docs: https://docs.cypress.io/

Practising another tool?