SlideShare a Scribd company logo
Build reliableSvelte
applications usingCypress
Maurice de Beijer
@mauricedb
1
 Maurice de Beijer
 The Problem Solver
 Microsoft MVP
 Freelance developer/instructor
 Twitter: @mauricedb
 Web: http://www.TheProblemSolver.nl
 E-mail: maurice.de.beijer@gmail.com
2
Cypress.io
Course
3
Topics
 What is Cypress.io?
 UsingTDD to building a SvelteKit application
 Testing pages
 API testing
 Running the Cypress tests in GitHub Actions
4
What isCypress and
why should you care?
5
Cypress.io
6
What is
Cypress?
 Cypress is a front end testing tool
 Built for the modern web
 Tests are easy to write
 Using simple JavaScript orTypeScript
 TimeTravel runner lets you inspect test at each step
 Click on a step to see the state of the browser
 Automatic waiting for elements
 Makes tests more resilient
 Video recording of running test
 Helps debugging failing tests on the CI server
7
What is
Cypress?
 Lets you fake the network when required
 Or use the real backend as appropriate
 Automatically retry of failing tests
 Run flaky tests multiple times
 Many standard and 3rd party extensions
 Or write your own in JavaScript
 Can run in Docker containers
 Consistent cross platform behavior
 Runs inside the browser
 Not based onW3C WebDriver API
8
Testing
Triangle
🗣
End 2 End
Integration
UnitTesting
9
UnitTesting
10
Why End to End?
The more your tests resemble the way your software
is used, the more confidence they can give you!
Kent C. Dodds
11
What we are
building
12
How we are
testing
13
What is already done?
14
npm init svelte
15
Dependencies
16
Header.svelte
17
MovieCard.svelte
18
Cypress andTDD
19
Testing the
navigation
20
Testing anAPI
21
Intercepting an
AJAX request
22
GitHubAction
23
Code/Slides
 http://theproblemsolver.nl/Presentations
 https://github.com/mauricedb/sveltekit-cypress-tdd
24
Conclusion
 Cypress is a great tool for End to End testing
 More reliable then relying on unit testing and manual testing
 Write tests that resemble your user’s actions
 Great approach forTest Driven Development
 Test that your API’s return the shape you expect
 A mismatch can lead to vague errors
25
Maurice de Beijer
@mauricedb
maurice.de.beijer
@gmail.com
26

More Related Content

What's hot (20)

PDF
Practical DevSecOps Course - Part 1
Mohammed A. Imran
 
PPTX
The Journey to DevSecOps
SeniorStoryteller
 
PDF
DevSecOps - The big picture
DevSecOpsSg
 
PDF
DevSecOps: Bringing security to the DevOps pipeline
Aarno Aukia
 
PDF
Nick Drage & Fraser Scott - Epic battle devops vs security
DevSecCon
 
PDF
The Rise of DevSecOps - Fabian Lim - DevSecOpsSg
DevSecOpsSg
 
PDF
DevSecOps - The big picture
Stefan Streichsbier
 
PDF
Security as Code: A DevSecOps Approach
VMware Tanzu
 
PDF
DevSecOps Singapore 2017 - Security in the Delivery Pipeline
James Wickett
 
PDF
2019 DevSecOps Reference Architectures
Sonatype
 
PDF
RSAC DevSecOpsDays 2018 - We are all Equifax
Sonatype
 
PDF
The Emergent Cloud Security Toolchain for CI/CD
James Wickett
 
PDF
Renato Rodrigues - Security in the wild
DevSecCon
 
PDF
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)
Hui (Henry) Chen
 
PDF
DevSecCon London 2017: Shift happens ... by Colin Domoney
DevSecCon
 
PDF
DevSecCon London 2017: Threat modeling in a CI environment by Steven Wierckx
DevSecCon
 
PDF
The State of DevSecOps
DevOps Indonesia
 
PDF
Dos and Don'ts of DevSecOps
Priyanka Aash
 
PDF
How to automate your DevSecOps successfully
Manuel Pistner
 
Practical DevSecOps Course - Part 1
Mohammed A. Imran
 
The Journey to DevSecOps
SeniorStoryteller
 
DevSecOps - The big picture
DevSecOpsSg
 
DevSecOps: Bringing security to the DevOps pipeline
Aarno Aukia
 
Nick Drage & Fraser Scott - Epic battle devops vs security
DevSecCon
 
The Rise of DevSecOps - Fabian Lim - DevSecOpsSg
DevSecOpsSg
 
DevSecOps - The big picture
Stefan Streichsbier
 
Security as Code: A DevSecOps Approach
VMware Tanzu
 
DevSecOps Singapore 2017 - Security in the Delivery Pipeline
James Wickett
 
2019 DevSecOps Reference Architectures
Sonatype
 
RSAC DevSecOpsDays 2018 - We are all Equifax
Sonatype
 
The Emergent Cloud Security Toolchain for CI/CD
James Wickett
 
Renato Rodrigues - Security in the wild
DevSecCon
 
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)
Hui (Henry) Chen
 
DevSecCon London 2017: Shift happens ... by Colin Domoney
DevSecCon
 
DevSecCon London 2017: Threat modeling in a CI environment by Steven Wierckx
DevSecCon
 
The State of DevSecOps
DevOps Indonesia
 
Dos and Don'ts of DevSecOps
Priyanka Aash
 
How to automate your DevSecOps successfully
Manuel Pistner
 

Similar to Build reliable Svelte applications using Cypress (20)

PPTX
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Maurice De Beijer [MVP]
 
PPTX
Building reliable web applications using Cypress
Maurice De Beijer [MVP]
 
PDF
Cypress Testing Demystified: A Practical Guide
Testgrid.io
 
PPTX
Cypress E2E Testing
AnaBrankovic7
 
PPTX
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
PPTX
End to end test automation with cypress
PankajSingh184960
 
PDF
Cypress, charm and easy.
Yaroslav Pernerovsky
 
PPTX
Introduction toTesting with Cypress (Tool)
jules00763
 
PDF
MoT Athens meets Thessaloniki Software Testing & QA meetup
Thessaloniki Software Testing and QA meetup
 
PDF
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Christian Catalan
 
PPTX
Introduction to Integration Testing With Cypress
Erez Cohen
 
PPTX
Automation using Cypress
Mehdi Ali
 
PDF
Automated testing with Cypress
Yong Shean Chong
 
PPTX
Cypress.pptx
Arshad QA
 
PPTX
Progressive Web App Testing With Cypress.io
Knoldus Inc.
 
PDF
Modern e2e-testing-for-complex-web-applications-with-cypressio
Marios Fakiolas
 
PDF
Introduction to E2E in Cypress
Fabio Biondi
 
PDF
Cypress Automation Testing Tutorial (Part 1).pdf
bacancytechnology
 
PPTX
Cypress test techniques cucumber bdd framework,tdd,api tests course
Narayanan Palani
 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Maurice De Beijer [MVP]
 
Building reliable web applications using Cypress
Maurice De Beijer [MVP]
 
Cypress Testing Demystified: A Practical Guide
Testgrid.io
 
Cypress E2E Testing
AnaBrankovic7
 
Introduction to cypress in Angular (Chinese)
Hong Tat Yew
 
End to end test automation with cypress
PankajSingh184960
 
Cypress, charm and easy.
Yaroslav Pernerovsky
 
Introduction toTesting with Cypress (Tool)
jules00763
 
MoT Athens meets Thessaloniki Software Testing & QA meetup
Thessaloniki Software Testing and QA meetup
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Christian Catalan
 
Introduction to Integration Testing With Cypress
Erez Cohen
 
Automation using Cypress
Mehdi Ali
 
Automated testing with Cypress
Yong Shean Chong
 
Cypress.pptx
Arshad QA
 
Progressive Web App Testing With Cypress.io
Knoldus Inc.
 
Modern e2e-testing-for-complex-web-applications-with-cypressio
Marios Fakiolas
 
Introduction to E2E in Cypress
Fabio Biondi
 
Cypress Automation Testing Tutorial (Part 1).pdf
bacancytechnology
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Narayanan Palani
 
Ad

More from Maurice De Beijer [MVP] (20)

PPTX
Full-stack App in half a Day: Next.js 15 Development Bootcamp
Maurice De Beijer [MVP]
 
PPTX
Production-ready Next.js App with Cursor AI
Maurice De Beijer [MVP]
 
PPTX
Building Robust Web Applications with Test-Driven Development and Playwright:...
Maurice De Beijer [MVP]
 
PDF
Mastering React Server Components and Server Actions in React 19
Maurice De Beijer [MVP]
 
PPTX
Practice TypeScript Techniques Building React Server Components App
Maurice De Beijer [MVP]
 
PPTX
A foolproof Way to Estimate a Software Project
Maurice De Beijer [MVP]
 
PPTX
Building Reliable Applications Using React, .NET & Azure
Maurice De Beijer [MVP]
 
PPTX
Concurrent Rendering Adventures in React 18
Maurice De Beijer [MVP]
 
PPTX
Building reliable applications with React, C#, and Azure
Maurice De Beijer [MVP]
 
PPTX
Building large and scalable mission critical applications with React
Maurice De Beijer [MVP]
 
PPTX
Building Reliable Applications Using React, .NET & Azure
Maurice De Beijer [MVP]
 
PPTX
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
PPTX
Getting started with React Suspense and concurrent rendering
Maurice De Beijer [MVP]
 
PPTX
React suspense, not just for Alfred Hitchcock
Maurice De Beijer [MVP]
 
PPTX
From zero to hero with the Reactive extensions for JavaScript
Maurice De Beijer [MVP]
 
PPTX
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
PPTX
The new React
Maurice De Beijer [MVP]
 
PPTX
From zero to hero with the reactive extensions for JavaScript
Maurice De Beijer [MVP]
 
PPTX
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
PPTX
I am hooked on React
Maurice De Beijer [MVP]
 
Full-stack App in half a Day: Next.js 15 Development Bootcamp
Maurice De Beijer [MVP]
 
Production-ready Next.js App with Cursor AI
Maurice De Beijer [MVP]
 
Building Robust Web Applications with Test-Driven Development and Playwright:...
Maurice De Beijer [MVP]
 
Mastering React Server Components and Server Actions in React 19
Maurice De Beijer [MVP]
 
Practice TypeScript Techniques Building React Server Components App
Maurice De Beijer [MVP]
 
A foolproof Way to Estimate a Software Project
Maurice De Beijer [MVP]
 
Building Reliable Applications Using React, .NET & Azure
Maurice De Beijer [MVP]
 
Concurrent Rendering Adventures in React 18
Maurice De Beijer [MVP]
 
Building reliable applications with React, C#, and Azure
Maurice De Beijer [MVP]
 
Building large and scalable mission critical applications with React
Maurice De Beijer [MVP]
 
Building Reliable Applications Using React, .NET & Azure
Maurice De Beijer [MVP]
 
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
Getting started with React Suspense and concurrent rendering
Maurice De Beijer [MVP]
 
React suspense, not just for Alfred Hitchcock
Maurice De Beijer [MVP]
 
From zero to hero with the Reactive extensions for JavaScript
Maurice De Beijer [MVP]
 
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
The new React
Maurice De Beijer [MVP]
 
From zero to hero with the reactive extensions for JavaScript
Maurice De Beijer [MVP]
 
Why I am hooked on the future of React
Maurice De Beijer [MVP]
 
I am hooked on React
Maurice De Beijer [MVP]
 
Ad

Recently uploaded (20)

PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 

Build reliable Svelte applications using Cypress