Course Outline
Day 1 – Introduction & Basics
Introduction
- Understanding Cypress's position within the testing pyramid.
- Configuring the test automation environment using Node LTS and npm.
- Initializing a basic Cypress project.
- Executing the first “smoke” E2E test in both GUI and headless modes.
Core Concepts
- Exploring Cypress fundamentals, the command queue, and automatic retry mechanisms.
- Utilizing hooks: before, beforeEach, afterEach, after.
- Leveraging aliases and reusability via .as() and cy.get('@alias').
API (Contract) Testing
- Performing direct API testing with Cypress using cy.request().
- Implementing API stubbing with cy.intercept() to handle edge cases.
- Ensuring stability in frontend-backend integration.
Custom Cypress Commands
- Structuring repetitive actions such as login and navigation into custom commands.
- Writing cleaner, maintainable code through reusable calls like cy.login().
Schedule: A combination of theory, demonstrations, and practical exercises Prerequisites: Basic JavaScript knowledge, VSCode, and Git.
Day 2 – Advanced Practices & CI/CD
Building Complex Tests
- Automating comprehensive user journeys.
- Managing state using cy.intercept and cy.session.
- Mitigating flaky tests to enhance stability and execution speed.
Data-Driven Testing
- Managing test data through JSON files (fixtures).
- Creating parameterized tests that execute the same logic with varied inputs.
Cypress Plugins
- Reporting tools: mochawesome, allure-cypress, junit-reporter.
- Interaction extensions: cypress-file-upload, cypress-real-events.
- Accessibility checks: cypress-axe, cypress-audit.
- Visual regression testing: cypress-image-snapshot.
- Maintaining code quality: @testing-library/cypress, cypress-plugin-tab.
CI/CD with Cypress
- Integrating with GitHub Actions.
- Configuring the Node.js and Cypress environment for headless execution.
- Automating test execution upon push or pull request events.
- Securely managing sensitive credentials (secrets).
Summary and conclusion
Requirements
- Foundational knowledge of software testing principles.
Audience
- Software testing professionals.
Testimonials (3)
hands on exercises, easier to retain information
ashley bolen - Insurance Corporation of British Columbia
Course - Test Automation with Selenium
Very interesting subject and very knowledgeable trainer
Pedro Miguel Costa - Natixis
Course - Automation Testing with Cypress
Key topics can be discussed and agreed upon with the trainer in advance. Relaxed and pleasant atmosphere during the seminar days.