SlideShare a Scribd company logo
1 of 17
Download to read offline
Component Testing
with Cypress
by Walmyr Filho
Who am I?
I'm a software craftsman, clean coder,
blogger, YouTuber, Cypress.io ambassador,
online teacher, mentor, speaker, an active
member of the testing automation and
JavaScript communities, and a fan of good
music, tattoos, and skateboarding.
Walmyr Filho
01
02
03
Agenda
Concepts. What's Cypress? What's
component testing? Does
component testing replaces end-to-
end testing?
Step-by-step for:
- Installation
- Configuration
- Writing component tests
- Running component tests
Hands-on:
- Exploring a real project
- Continuous integration, Percy.io
and on Cypress.io's Dashboard
04
Q&A, Testing complex components,
docs, and other references
Concepts
What's Cypress?
Cypress is a modern testing framework for
anything that runs in a web browser.
What's component testing?
Component testing is about testing frontend web
components in isolation.
Does component testing replaces
end-to-end testing?
Nope. They complement each other.
Step-by-step
Installation
npm install --save-dev cypress @cypress/react
@cypress/webpack-dev-server webpack-dev-server
Configuration
Configuration - part 2
Writing component tests
Running component tests
npx cypress run-ct (headless mode)
npx cypress open-ct (interactive mode)
Hands-on
Q&A
References
https://docs.cypress.io/guides/component-testing/introduction
https://docs.cypress.io/guides/component-testing/framework-configuration
https://github.com/wlsf82/hackernews
https://glebbahmutov.com/blog/my-vision-for-component-tests
https://github.com/cypress-io/cypress/tree/master/npm/react#examples
Thanks!
https://walmyr.dev

More Related Content

What's hot

What's hot (20)

Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With Cypress
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
 
Progressive Web App Testing With Cypress.io
Progressive Web App Testing With Cypress.ioProgressive Web App Testing With Cypress.io
Progressive Web App Testing With Cypress.io
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
 
Cypress E2E Testing
Cypress E2E TestingCypress E2E Testing
Cypress E2E Testing
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
QA Challenge Accepted 4.0 - Cypress vs. Selenium
QA Challenge Accepted 4.0 - Cypress vs. SeleniumQA Challenge Accepted 4.0 - Cypress vs. Selenium
QA Challenge Accepted 4.0 - Cypress vs. Selenium
 
Introduction to E2E in Cypress
Introduction to E2E in CypressIntroduction to E2E in Cypress
Introduction to E2E in Cypress
 
Cypress report
Cypress reportCypress report
Cypress report
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
 
Rest assured
Rest assuredRest assured
Rest assured
 
Testes E2E em Cypress com JS
Testes E2E em Cypress com JSTestes E2E em Cypress com JS
Testes E2E em Cypress com JS
 
Cypress Automation Testing Tutorial (Part 1).pdf
Cypress Automation Testing Tutorial (Part 1).pdfCypress Automation Testing Tutorial (Part 1).pdf
Cypress Automation Testing Tutorial (Part 1).pdf
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
 

Similar to Component testing with cypress

Consistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and ChefConsistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and Chef
Gerald Villorente
 
Sai devops - the art of being specializing generalist
Sai   devops - the art of being specializing generalistSai   devops - the art of being specializing generalist
Sai devops - the art of being specializing generalist
Odd-e
 
Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
LB Denker
 
Application lifecycle management in SharePoint
Application lifecycle management in SharePointApplication lifecycle management in SharePoint
Application lifecycle management in SharePoint
Jeremy Thake
 
Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...
Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...
Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...
DevOpsDays Tel Aviv
 
Continuous Delivery (Internet-Briefing 2012-04-03)
Continuous Delivery (Internet-Briefing 2012-04-03)Continuous Delivery (Internet-Briefing 2012-04-03)
Continuous Delivery (Internet-Briefing 2012-04-03)
Netcetera
 

Similar to Component testing with cypress (20)

Introduction To Cypress | Differences Between Cypress & Selenium
Introduction To Cypress | Differences Between Cypress & SeleniumIntroduction To Cypress | Differences Between Cypress & Selenium
Introduction To Cypress | Differences Between Cypress & Selenium
 
10 practices that every developer needs to start right now
10 practices that every developer needs to start right now10 practices that every developer needs to start right now
10 practices that every developer needs to start right now
 
Consistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and ChefConsistent Development Environment with Vagrant and Chef
Consistent Development Environment with Vagrant and Chef
 
Sai devops - the art of being specializing generalist
Sai   devops - the art of being specializing generalistSai   devops - the art of being specializing generalist
Sai devops - the art of being specializing generalist
 
Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming language
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
Ember. it is time to try
Ember. it is time to tryEmber. it is time to try
Ember. it is time to try
 
Testing beyond the default click-paths
Testing beyond  the default click-pathsTesting beyond  the default click-paths
Testing beyond the default click-paths
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
QA or the Highway 2022.pptx
QA or the Highway 2022.pptxQA or the Highway 2022.pptx
QA or the Highway 2022.pptx
 
Cypress Testing Demystified: A Practical Guide
Cypress Testing Demystified: A Practical GuideCypress Testing Demystified: A Practical Guide
Cypress Testing Demystified: A Practical Guide
 
Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
 
AvenDATA and Devops
AvenDATA and DevopsAvenDATA and Devops
AvenDATA and Devops
 
Application lifecycle management in SharePoint
Application lifecycle management in SharePointApplication lifecycle management in SharePoint
Application lifecycle management in SharePoint
 
Using DevOps to Improve Software Quality in the Cloud
Using DevOps to Improve Software Quality in the CloudUsing DevOps to Improve Software Quality in the Cloud
Using DevOps to Improve Software Quality in the Cloud
 
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 MonthsHow EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
 
Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...
Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...
Design patterns for efficient DevOps processes - Rebecca Fitzhugh - DevOpsDay...
 
Continuous Delivery (Internet-Briefing 2012-04-03)
Continuous Delivery (Internet-Briefing 2012-04-03)Continuous Delivery (Internet-Briefing 2012-04-03)
Continuous Delivery (Internet-Briefing 2012-04-03)
 
Integration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsIntegration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real Things
 
Serverless and CI/CD
Serverless and CI/CDServerless and CI/CD
Serverless and CI/CD
 

More from Walmyr Lima e Silva Filho

More from Walmyr Lima e Silva Filho (18)

Testando na Gringa - Se preparando para uma entrevista técnica para uma vaga ...
Testando na Gringa - Se preparando para uma entrevista técnica para uma vaga ...Testando na Gringa - Se preparando para uma entrevista técnica para uma vaga ...
Testando na Gringa - Se preparando para uma entrevista técnica para uma vaga ...
 
Writing cypress tests without cucumber
Writing cypress tests without cucumberWriting cypress tests without cucumber
Writing cypress tests without cucumber
 
Como criar testes rápidos e robustos com Cypress
Como criar testes rápidos e robustos com CypressComo criar testes rápidos e robustos com Cypress
Como criar testes rápidos e robustos com Cypress
 
Esquenta QAX
Esquenta QAXEsquenta QAX
Esquenta QAX
 
Agile Testing - A quality culture in the company's core business
Agile Testing - A quality culture in the company's core businessAgile Testing - A quality culture in the company's core business
Agile Testing - A quality culture in the company's core business
 
How to kill software quality in five steps
How to kill software quality in five stepsHow to kill software quality in five steps
How to kill software quality in five steps
 
Lessons learned as a software engineer working at appear.in
Lessons learned as a software engineer working at appear.inLessons learned as a software engineer working at appear.in
Lessons learned as a software engineer working at appear.in
 
Oslo QA Meetup
Oslo QA MeetupOslo QA Meetup
Oslo QA Meetup
 
Estratégias para o uso de integração e entrega contínua com gocd
Estratégias para o uso de integração e entrega contínua com gocdEstratégias para o uso de integração e entrega contínua com gocd
Estratégias para o uso de integração e entrega contínua com gocd
 
Agile testing coach Agile Lean Ireland 2017
Agile testing coach   Agile Lean Ireland 2017Agile testing coach   Agile Lean Ireland 2017
Agile testing coach Agile Lean Ireland 2017
 
Protractor tests no processo de integração contínua
Protractor tests no processo de integração contínuaProtractor tests no processo de integração contínua
Protractor tests no processo de integração contínua
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
 
TDC 2016 Trilha Testes - Floripa
TDC 2016 Trilha Testes - FloripaTDC 2016 Trilha Testes - Floripa
TDC 2016 Trilha Testes - Floripa
 
Protractor style guide - Agile Testers Conference 2016
Protractor style guide - Agile Testers Conference 2016Protractor style guide - Agile Testers Conference 2016
Protractor style guide - Agile Testers Conference 2016
 
Primeiros passos com protractor - GUTS-SC
Primeiros passos com protractor - GUTS-SCPrimeiros passos com protractor - GUTS-SC
Primeiros passos com protractor - GUTS-SC
 
Protractor + visual review 2
Protractor + visual review 2Protractor + visual review 2
Protractor + visual review 2
 
Agile testing coach - Agile Trends Floripa
Agile testing coach - Agile Trends FloripaAgile testing coach - Agile Trends Floripa
Agile testing coach - Agile Trends Floripa
 
Palestra agile testing coaching
Palestra agile testing coaching Palestra agile testing coaching
Palestra agile testing coaching
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Component testing with cypress