SlideShare a Scribd company logo
Test Automation
using cypress
Fundamentals & Advanced Techniques
Who we are…
Anastasia Tsavdari Gkiorgkini
 QA Analyst at Onelity
 ISQTB Certified Foundation &
Agile Tester
 LinkedIn: @anastasia-tsavdari-
gkiorgkini
Georgios Iliadis
 Automation Test Lead at EPG
Financials Greece
 LinkedIn: @georilia
What we will discuss today
 Accessibility & Performance Testing using pa11y & export reports
 BDD testing with cucumber on cypress
 Create a Feature Acceptance scenario using Page Object Pattern
 Run the same scenarios in multiple environments using also different
configuration
 Use Allure Reporting to review test run results
 Integrate Cypress with Jenkins in CI/CD and export results on Xray
Why Cypress…
 Cypress is a testing framework based on Java-Script and it that is designed to
simplify the process of writing and running our automated tests.
 It runs directly in the browser – this gives us more control over the browser and
provides features that are not available on WebDriver-based frameworks.
 Faster Test Execution: tests execute faster than WebDriver-based frameworks, due
to the direct connection to the DOM.
 Allows to manipulate the DOM, intercept network requests & responses, and more.
This makes it easier to write tests and produces more accurate results after
executions.
Why Cypress…
 Automatic Waiting: Cypress can be configured to waits for commands and
assertions to complete before moving on to the next step in your test. This
eliminates the need for manual waits and timeouts, which can often lead to fragile
tests.
 No Need for External Drivers such as Selenium WebDriver or even installed
browser as it has preinstalled its own browser (based on Electron)
 Test Recorder: Cypress comes with a built-in test recorder that allows you to record
your interactions with your application and generate videos and screenshot on
failure.
 API Testing: Cypress has built-in support for testing APIs, which allows you to easily
write and run API tests alongside your end-to-end tests.
 Accessibility & Performance Testing: Verify the application is accessible for users
with disabilities & measure the speed/responsiveness of the application.
Accessibility Testing
 Accessibility means designing products which are accessible to all
 Legal Argument of Accessibility is the reason to test:
https://www.w3.org/WAI/standards-guidelines/wcag/
 We must test an interface against a set of guideline if we want to be considered for
accessibility testing: most common WCAG_2.1
 2 libraries in cypress: Axe-core the most common BUT
 Today we focus on pa11y!
Setup for Accessibility &
Performance with pa11y
 Install 2 packages:
❑ npm install –save-dev @cypress-audit/pa11y
❑ npm install –save-dev @cypress-audit/lighthouse
 Configure cypress.config.js
 Configure e2e.js
Performance Testing with pa11y -
Lighthouse
 Performance: measures how fast the content visually load on page load.
 SEO: the process of making your site better for search engines
 Best-Practices: The 16 Best Practices tested by Lighthouse mainly focus on security
aspects of websites & modern standards of web development.
 Progressive Web App (PWA): use service workers, manifests & web-platform
features in combination with progressive enhancement to run the app in any device
Export Reports with Mochawesome
 Install cypress plugin: mochawesome
❑ npm install --save-dev mochawesome mochawesome-merge
mochawesome-report-generator
 Configure cypress.config.js
 Run the tests headless & export json report
❑ npx cypress run --reporter mochawesome --headless --browser chrome cy
 Export to html
❑ npx marge report.json
Why Cucumber…
 Create clear and easy-to-read automated tests
 Improving collaboration between developers, testers, and business analysts.
 Increases reusability of test scenarios, reducing the time and effort required to
create and maintain test cases.
 Better test coverage with more comprehensive scenarios, identifying potential
issues early in the development process.
 Improved traceability of requirements to test cases.
Integrate Cucumber into Cypress
 After Cypress installation we will need two additional node packages
❑ cypress-cucumber-preprocessor
❑ cypress-esbuild-preprocessor
❑ esbuild
 Add the proper configuration into ‘cypress.config.js’ which will compile our feature
files before test execution
 Parametrize cypress cucumber preprocessor to discover the step definitions and the
feature files
Create a Feature Acceptance Test
 Create Page Object Folder
 Create the pre desired objects as folders and inside create the object classes
 Split the classes in three parts
1. Main Object Functionality – Clicks , types , selects
2. Object Validations - Element Visibility , calculations , results
3. Object Locators – Element locators (xpath, ids)
 Create common helpers to speed up the process
 Create Step Definitions matching each main Object
 Create a const which will generate our classes inside each Step Definition
 Match the Feature File steps with the step Definitions
Run tests in different environments
 We can run the same tests in different envs by using Cypress env variables
❑ let secretKey = Cypress.env(‘secretKey’) ---- secretKey = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ
❑ let adminPass = Cypress.env(‘adminPass’) ---- adminPass = Abc+123+@
 We should define the environments that our cypress suite needs to run
 Create a specific file for each environment which will contain all our properties
 Override Cypress default configuration through ‘cypress.config.js’
 Pass through npm command our environment preference, --env environment=demo
Allure Reporting
 Better Visualization of Test Results: Allure Reporting provides a more visually
appealing and informative report than Cucumber Report. The reports generated by
Allure contain detailed and interactive graphs, charts, and tables that make it easier
to understand the test results.
 Easy to Install and Configure: Allure Reporting is easy to install and configure. It
requires minimal setup and can be integrated with various testing frameworks such
as JUnit, TestNG, and Cucumber.
 Integration with CI/CD tools: Allure Reporting has seamless integration with
popular CI/CD tools like Jenkins. This means that the reports can be automatically
generated and published after each build, making it easier for teams to track test
results.
 Extensible and Customizable: Allure Reporting is extensible and customizable. It
provides a plugin system that allows users to add custom widgets, plugins, and
extensions to the reports. This makes it easier to tailor the reports to meet specific
project needs.
Allure Reporting – Install
 Install additional node packages
❑ allure-commandline
❑ cypress-allure-plugin
 Import “cypress-allure-plugin” in e2e.support file which is processed and loaded
automatically before our test files
 Call allure task on cypress.config.js file
 Enable/Disable Allure using an env property in env files “allure": true/false
 Generate the report after the execution with a npm post test command
❑ "posttest": "allure generate allure-results --clean -o allure-report && allure
open allure-report"
Execute in Jenkins
 Automated Testing: By integrating Cypress with Jenkins, you can automate your
test suite to run as a part of your continuous integration (CI) and continuous
deployment (CD) pipelines. This ensures that every code change is thoroughly
tested before it is deployed, reducing the risk of bugs and issues in production.
 Consistent Testing Environment: Jenkins provides a consistent testing environment,
ensuring that your tests are executed in the same environment every time. This
helps in identifying issues related to specific environments, such as browser
compatibility issues, and enables you to fix them early on.
 Faster Feedback: Cypress provides fast test execution, and by running it in Jenkins,
you can get feedback on your tests' results quickly. You can set up Jenkins to
automatically trigger Cypress tests on code commits, and the results can be shared
with the team via email, slack or any other means of communication.
 Easy Debugging: Cypress provides an excellent debugging experience, and by
running it in Jenkins, you can easily troubleshoot any test.
Export Results in XRAY
 Centralized Test Management: Xray provides a centralized platform for managing
and tracking test results across different teams and projects.
 Improved Test Visibility: Exporting test results from Cypress to Xray provides better
visibility into test execution status, enabling teams to quickly identify and address
issues that arise during testing.
 Integration with Jira: Xray integrates seamlessly with Jira, enabling teams to track
and manage test execution status directly within Jira issues.
 Traceability: By exporting test results to Xray, teams can establish traceability
between test cases, requirements, and other artifacts, enabling better tracking and
reporting of testing progress.
 Metrics and Reporting: Xray provides a range of metrics and reporting options that
enable teams to analyze testing performance, identify trends, and make data-driven
decisions to improve testing processes.
 Collaboration: Xray enables teams to collaborate more effectively by sharing test
results, creating test plans, and managing test execution across different teams and
projects.
Useful links
➢ Web Accessibility Initiative
➢ WCAG 2.1 standard
➢ Cypress Plugins
➢ Pa11y library
➢ Google lighthouse docs
➢ Google lighthouse github
Thank you for
your attention!
Question Time.

More Related Content

Similar to MoT Athens meets Thessaloniki Software Testing & QA meetup

Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
Karim Fanadka
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016
Karim Fanadka
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
Amazon Web Services
 
Tour of Azure DevOps
Tour of Azure DevOpsTour of Azure DevOps
Tour of Azure DevOps
Callon Campbell
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated Testing
Acquia
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
DevOps.com
 
Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18
Mary Joy Sabal
 
MidSem
MidSemMidSem
Putting it All Together: Securing Systems at Cloud Scale
Putting it All Together: Securing Systems at Cloud ScalePutting it All Together: Securing Systems at Cloud Scale
Putting it All Together: Securing Systems at Cloud Scale
Amazon Web Services
 
Devops architecture
Devops architectureDevops architecture
Devops architecture
Ojasvi Jagtap
 
Automated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAutomated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWS
Amazon Web Services
 
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdfLesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Minh Quân Đoàn
 
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
PankajSingh184960
 
How to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdfHow to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdf
pcloudy2
 
Visual Studio ALM and DevOps Tools Walkthrough
Visual Studio ALM and DevOps Tools WalkthroughVisual Studio ALM and DevOps Tools Walkthrough
Visual Studio ALM and DevOps Tools Walkthrough
Angela Dugan
 
What is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialWhat is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorial
jeetendra mandal
 
Updated resume
Updated resumeUpdated resume
Updated resume
LADDU SHASHAVALI
 
Sweta_Tarekar_Resume
Sweta_Tarekar_ResumeSweta_Tarekar_Resume
Sweta_Tarekar_Resume
sweta tarekar
 
VCS_QAPerformanceSlides
VCS_QAPerformanceSlidesVCS_QAPerformanceSlides
VCS_QAPerformanceSlides
Michael Cowan
 
Cloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak KoyuncuCloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak Koyuncu
Keytorc Software Testing Services
 

Similar to MoT Athens meets Thessaloniki Software Testing & QA meetup (20)

Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
Tour of Azure DevOps
Tour of Azure DevOpsTour of Azure DevOps
Tour of Azure DevOps
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated Testing
 
Modernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-ArchitectModernizing Testing as Apps Re-Architect
Modernizing Testing as Apps Re-Architect
 
Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18
 
MidSem
MidSemMidSem
MidSem
 
Putting it All Together: Securing Systems at Cloud Scale
Putting it All Together: Securing Systems at Cloud ScalePutting it All Together: Securing Systems at Cloud Scale
Putting it All Together: Securing Systems at Cloud Scale
 
Devops architecture
Devops architectureDevops architecture
Devops architecture
 
Automated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAutomated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWS
 
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdfLesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
 
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
 
How to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdfHow to use Selenium Grid for Multi-Browser Testing.pdf
How to use Selenium Grid for Multi-Browser Testing.pdf
 
Visual Studio ALM and DevOps Tools Walkthrough
Visual Studio ALM and DevOps Tools WalkthroughVisual Studio ALM and DevOps Tools Walkthrough
Visual Studio ALM and DevOps Tools Walkthrough
 
What is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialWhat is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorial
 
Updated resume
Updated resumeUpdated resume
Updated resume
 
Sweta_Tarekar_Resume
Sweta_Tarekar_ResumeSweta_Tarekar_Resume
Sweta_Tarekar_Resume
 
VCS_QAPerformanceSlides
VCS_QAPerformanceSlidesVCS_QAPerformanceSlides
VCS_QAPerformanceSlides
 
Cloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak KoyuncuCloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak Koyuncu
 

More from Thessaloniki Software Testing and QA meetup

A Journey Inside a React Native App No Pain No Gain
A Journey Inside a React Native App No Pain No GainA Journey Inside a React Native App No Pain No Gain
A Journey Inside a React Native App No Pain No Gain
Thessaloniki Software Testing and QA meetup
 
Kubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native ApproachKubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native Approach
Thessaloniki Software Testing and QA meetup
 
Service Testing - Workshop Thessaloniki Meetup
Service Testing - Workshop Thessaloniki Meetup Service Testing - Workshop Thessaloniki Meetup
Service Testing - Workshop Thessaloniki Meetup
Thessaloniki Software Testing and QA meetup
 
Service testing - Introduction to SoapUI & groovy
Service testing - Introduction to SoapUI & groovyService testing - Introduction to SoapUI & groovy
Service testing - Introduction to SoapUI & groovy
Thessaloniki Software Testing and QA meetup
 
Selenium for java developers
Selenium for java developersSelenium for java developers
Selenium for java developers
Thessaloniki Software Testing and QA meetup
 
Automated Test Generation
Automated Test GenerationAutomated Test Generation
It’s a world of bugs after all
It’s a world of bugs after allIt’s a world of bugs after all
It’s a world of bugs after all
Thessaloniki Software Testing and QA meetup
 
GUI, Performance, Load and API testing with Test Studio
GUI, Performance, Load and API testing with Test StudioGUI, Performance, Load and API testing with Test Studio
GUI, Performance, Load and API testing with Test Studio
Thessaloniki Software Testing and QA meetup
 
Test automation-framework
Test automation-frameworkTest automation-framework

More from Thessaloniki Software Testing and QA meetup (9)

A Journey Inside a React Native App No Pain No Gain
A Journey Inside a React Native App No Pain No GainA Journey Inside a React Native App No Pain No Gain
A Journey Inside a React Native App No Pain No Gain
 
Kubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native ApproachKubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native Approach
 
Service Testing - Workshop Thessaloniki Meetup
Service Testing - Workshop Thessaloniki Meetup Service Testing - Workshop Thessaloniki Meetup
Service Testing - Workshop Thessaloniki Meetup
 
Service testing - Introduction to SoapUI & groovy
Service testing - Introduction to SoapUI & groovyService testing - Introduction to SoapUI & groovy
Service testing - Introduction to SoapUI & groovy
 
Selenium for java developers
Selenium for java developersSelenium for java developers
Selenium for java developers
 
Automated Test Generation
Automated Test GenerationAutomated Test Generation
Automated Test Generation
 
It’s a world of bugs after all
It’s a world of bugs after allIt’s a world of bugs after all
It’s a world of bugs after all
 
GUI, Performance, Load and API testing with Test Studio
GUI, Performance, Load and API testing with Test StudioGUI, Performance, Load and API testing with Test Studio
GUI, Performance, Load and API testing with Test Studio
 
Test automation-framework
Test automation-frameworkTest automation-framework
Test automation-framework
 

Recently uploaded

How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 

Recently uploaded (20)

How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 

MoT Athens meets Thessaloniki Software Testing & QA meetup

  • 2. Who we are… Anastasia Tsavdari Gkiorgkini  QA Analyst at Onelity  ISQTB Certified Foundation & Agile Tester  LinkedIn: @anastasia-tsavdari- gkiorgkini Georgios Iliadis  Automation Test Lead at EPG Financials Greece  LinkedIn: @georilia
  • 3. What we will discuss today  Accessibility & Performance Testing using pa11y & export reports  BDD testing with cucumber on cypress  Create a Feature Acceptance scenario using Page Object Pattern  Run the same scenarios in multiple environments using also different configuration  Use Allure Reporting to review test run results  Integrate Cypress with Jenkins in CI/CD and export results on Xray
  • 4. Why Cypress…  Cypress is a testing framework based on Java-Script and it that is designed to simplify the process of writing and running our automated tests.  It runs directly in the browser – this gives us more control over the browser and provides features that are not available on WebDriver-based frameworks.  Faster Test Execution: tests execute faster than WebDriver-based frameworks, due to the direct connection to the DOM.  Allows to manipulate the DOM, intercept network requests & responses, and more. This makes it easier to write tests and produces more accurate results after executions.
  • 5. Why Cypress…  Automatic Waiting: Cypress can be configured to waits for commands and assertions to complete before moving on to the next step in your test. This eliminates the need for manual waits and timeouts, which can often lead to fragile tests.  No Need for External Drivers such as Selenium WebDriver or even installed browser as it has preinstalled its own browser (based on Electron)  Test Recorder: Cypress comes with a built-in test recorder that allows you to record your interactions with your application and generate videos and screenshot on failure.  API Testing: Cypress has built-in support for testing APIs, which allows you to easily write and run API tests alongside your end-to-end tests.  Accessibility & Performance Testing: Verify the application is accessible for users with disabilities & measure the speed/responsiveness of the application.
  • 6. Accessibility Testing  Accessibility means designing products which are accessible to all  Legal Argument of Accessibility is the reason to test: https://www.w3.org/WAI/standards-guidelines/wcag/  We must test an interface against a set of guideline if we want to be considered for accessibility testing: most common WCAG_2.1  2 libraries in cypress: Axe-core the most common BUT  Today we focus on pa11y!
  • 7. Setup for Accessibility & Performance with pa11y  Install 2 packages: ❑ npm install –save-dev @cypress-audit/pa11y ❑ npm install –save-dev @cypress-audit/lighthouse  Configure cypress.config.js  Configure e2e.js
  • 8. Performance Testing with pa11y - Lighthouse  Performance: measures how fast the content visually load on page load.  SEO: the process of making your site better for search engines  Best-Practices: The 16 Best Practices tested by Lighthouse mainly focus on security aspects of websites & modern standards of web development.  Progressive Web App (PWA): use service workers, manifests & web-platform features in combination with progressive enhancement to run the app in any device
  • 9. Export Reports with Mochawesome  Install cypress plugin: mochawesome ❑ npm install --save-dev mochawesome mochawesome-merge mochawesome-report-generator  Configure cypress.config.js  Run the tests headless & export json report ❑ npx cypress run --reporter mochawesome --headless --browser chrome cy  Export to html ❑ npx marge report.json
  • 10. Why Cucumber…  Create clear and easy-to-read automated tests  Improving collaboration between developers, testers, and business analysts.  Increases reusability of test scenarios, reducing the time and effort required to create and maintain test cases.  Better test coverage with more comprehensive scenarios, identifying potential issues early in the development process.  Improved traceability of requirements to test cases.
  • 11. Integrate Cucumber into Cypress  After Cypress installation we will need two additional node packages ❑ cypress-cucumber-preprocessor ❑ cypress-esbuild-preprocessor ❑ esbuild  Add the proper configuration into ‘cypress.config.js’ which will compile our feature files before test execution  Parametrize cypress cucumber preprocessor to discover the step definitions and the feature files
  • 12. Create a Feature Acceptance Test  Create Page Object Folder  Create the pre desired objects as folders and inside create the object classes  Split the classes in three parts 1. Main Object Functionality – Clicks , types , selects 2. Object Validations - Element Visibility , calculations , results 3. Object Locators – Element locators (xpath, ids)  Create common helpers to speed up the process  Create Step Definitions matching each main Object  Create a const which will generate our classes inside each Step Definition  Match the Feature File steps with the step Definitions
  • 13. Run tests in different environments  We can run the same tests in different envs by using Cypress env variables ❑ let secretKey = Cypress.env(‘secretKey’) ---- secretKey = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ ❑ let adminPass = Cypress.env(‘adminPass’) ---- adminPass = Abc+123+@  We should define the environments that our cypress suite needs to run  Create a specific file for each environment which will contain all our properties  Override Cypress default configuration through ‘cypress.config.js’  Pass through npm command our environment preference, --env environment=demo
  • 14. Allure Reporting  Better Visualization of Test Results: Allure Reporting provides a more visually appealing and informative report than Cucumber Report. The reports generated by Allure contain detailed and interactive graphs, charts, and tables that make it easier to understand the test results.  Easy to Install and Configure: Allure Reporting is easy to install and configure. It requires minimal setup and can be integrated with various testing frameworks such as JUnit, TestNG, and Cucumber.  Integration with CI/CD tools: Allure Reporting has seamless integration with popular CI/CD tools like Jenkins. This means that the reports can be automatically generated and published after each build, making it easier for teams to track test results.  Extensible and Customizable: Allure Reporting is extensible and customizable. It provides a plugin system that allows users to add custom widgets, plugins, and extensions to the reports. This makes it easier to tailor the reports to meet specific project needs.
  • 15. Allure Reporting – Install  Install additional node packages ❑ allure-commandline ❑ cypress-allure-plugin  Import “cypress-allure-plugin” in e2e.support file which is processed and loaded automatically before our test files  Call allure task on cypress.config.js file  Enable/Disable Allure using an env property in env files “allure": true/false  Generate the report after the execution with a npm post test command ❑ "posttest": "allure generate allure-results --clean -o allure-report && allure open allure-report"
  • 16. Execute in Jenkins  Automated Testing: By integrating Cypress with Jenkins, you can automate your test suite to run as a part of your continuous integration (CI) and continuous deployment (CD) pipelines. This ensures that every code change is thoroughly tested before it is deployed, reducing the risk of bugs and issues in production.  Consistent Testing Environment: Jenkins provides a consistent testing environment, ensuring that your tests are executed in the same environment every time. This helps in identifying issues related to specific environments, such as browser compatibility issues, and enables you to fix them early on.  Faster Feedback: Cypress provides fast test execution, and by running it in Jenkins, you can get feedback on your tests' results quickly. You can set up Jenkins to automatically trigger Cypress tests on code commits, and the results can be shared with the team via email, slack or any other means of communication.  Easy Debugging: Cypress provides an excellent debugging experience, and by running it in Jenkins, you can easily troubleshoot any test.
  • 17. Export Results in XRAY  Centralized Test Management: Xray provides a centralized platform for managing and tracking test results across different teams and projects.  Improved Test Visibility: Exporting test results from Cypress to Xray provides better visibility into test execution status, enabling teams to quickly identify and address issues that arise during testing.  Integration with Jira: Xray integrates seamlessly with Jira, enabling teams to track and manage test execution status directly within Jira issues.  Traceability: By exporting test results to Xray, teams can establish traceability between test cases, requirements, and other artifacts, enabling better tracking and reporting of testing progress.  Metrics and Reporting: Xray provides a range of metrics and reporting options that enable teams to analyze testing performance, identify trends, and make data-driven decisions to improve testing processes.  Collaboration: Xray enables teams to collaborate more effectively by sharing test results, creating test plans, and managing test execution across different teams and projects.
  • 18. Useful links ➢ Web Accessibility Initiative ➢ WCAG 2.1 standard ➢ Cypress Plugins ➢ Pa11y library ➢ Google lighthouse docs ➢ Google lighthouse github
  • 19. Thank you for your attention! Question Time.