Course Outline
Day 1 – Introduction & Fundamentals
Introduction
- The role of Cypress within the testing pyramid.
- Setting up the automation environment (Node LTS, npm).
- Initializing a basic Cypress project.
- Writing the first “smoke” E2E test in both GUI and headless modes.
Core Concepts
- Understanding Cypress basics, the command queue, and automatic retry mechanisms.
- Utilizing hooks: before, beforeEach, afterEach, and after.
- Implementing aliases for reusability (.as(), cy.get('@alias')).
API (Contract) Testing
- Performing direct API tests using Cypress (cy.request()).
- Stubbing APIs with cy.intercept() to handle edge cases.
- Verifying the stability of frontend-backend integrations.
Custom Cypress Commands
- Consolidating repetitive tasks like login and navigation into custom commands.
- Enhancing code cleanliness and maintainability through reusable calls (e.g., cy.login()).
Schedule: Theory, demonstrations, and hands-on exercises. Prerequisites: Basic JavaScript knowledge, VSCode, and Git.
Day 2 – Advanced Practices & CI/CD
Developing Complex Tests
- Automating complete user journey flows.
- Managing state using cy.intercept and cy.session.
- Mitigating flaky tests to boost stability and execution speed.
Data-Driven Testing
- Managing test data via JSON files (fixtures).
- Running parameterized tests to apply the same logic across multiple inputs.
Cypress Plugins
- Reporting tools: mochawesome, allure-cypress, junit-reporter.
- Interaction utilities: cypress-file-upload, cypress-real-events.
- Accessibility checks: cypress-axe, cypress-audit.
- Visual regression testing: cypress-image-snapshot.
- Enhancing maintainability: @testing-library/cypress, cypress-plugin-tab.
CI/CD with Cypress
- Integrating with GitHub Actions.
- Configuring the Node.js and Cypress environment for headless execution.
- Triggering automated test runs on push or pull request events.
- Securely managing secrets and credentials.
Summary and Conclusion
Requirements
- Foundational knowledge of software testing principles.
Target Audience
- Software testers seeking to advance their automation skills.
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.