SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Understanding Layers of Testing
By Christopher Rex,
ThoughtWorks
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Software Evolution
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Challenge
What can be a sensible test approach?
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Evolution of Automated Testing
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Challenge
How to build an efficient automation suite?
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Problems
What can be a sensible test approach? How to build an efficient automation suite?
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Anti Patterns
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Solution
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
How to proceed?
1. Build a deeper understanding of
AUT
๏ Layered approach to testing
2. Test for the right logic in the right
layer
๏ Sensible functional testing
๏ Efficient automation testing
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Demo code - https://github.com/christopher-rex/sample-test-pyramid
QuickTour of AUT
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
ActivityTime: List test scenarios
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Login Functionality
Acceptance Criteria:
AC #1:
Given I am a registered user
And my email account has been verified
When I login to the application
Then login succeeds
AC #2:
Given I am not a registered user
When I login to the application
Then login fails
AC #3:
Given I am a registered user
And my email has not been verified yet
When I login to the application
Then login succeeds with a prompt to verify email
AC #4:
Given I am a registered user
And my email account has been verified
And my account has been disabled
When I login to the application
Then login fails
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Login Test Scenarios
1. Verify successful login
2. Verify on providing an email-id of user not registered, login fails with an appropriate
error message
3. Verify not providing any input and submitting the form, results in appropriate error
message
4. Verify on providing partial input say email-id or password and submitting the form,
results in appropriate error message
5. Verify on providing incomplete email-id, login fails with an appropriate error message
6. Verify on providing an email-id of a disabled user and submitting the form, login fails
with an appropriate error message
7. Verify on providing an email-id of user whose account is not verified, login succeeds
with an appropriate warning message
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Testing Approach
1. How can we approach testing this user-authentication feature?
2. Do we have enough information to define a testing approach?
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Understanding Application Architecture
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Testing E2E layer
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Testing Service layer
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Testing UI layer with a stubbed server
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Summary of Testing approach
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
ActivityTime: Layer the scenarios
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Login Test Scenarios -Layered
UI Tests
E2E Tests
1. Verify successful login
2. Verify on providing an email-id of user not
registered, login fails with an appropriate error
message
Stubbed Tests
3. Verify not providing any input and submitting the
form, results in appropriate error message
4. Verify on providing partial input say email-id or
password and submitting the form, results in
appropriate error message
Service Tests
Integration Tests
1. Verify valid login results in success response
2. Verify login request with email-id of an
unregistered user, results in error response
3. Verify login request with email-id of a disabled
user, results in error response
4. Verify login request with an unverified email-id,
results in error response with appropriate
response body
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Applying Layered Testing Approach
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Benefits of the Layered Testing Approach
1. Deeper understanding of responsibility/functionality of each layer
๏ Sensible testing
๏ Increased value of QA feedback
๏ Opens-out opportunities to do more NFR testing
2. Independent testing at each layer
๏ Uninterrupted development
๏ Testing edge cases with ease
3. Defects can be reported with analysis information
๏ Reduced time-to-fix
4. Reused logic can be tested only once
๏ Reduced testing time
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Application Architecture: Unit layer
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Automation Walkthrough
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Test Automation -Layered
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Test layer Number of tests Execution time
Last mile (Extension of E2E to
include integration with legacy
systems)
3 ~ 10 mins
E2E tests ~30 ~ 15 mins
Stubbed webapp tests ~280 ~ 20 mins (4 parallel threads with 70
tests per thread)
Integration tests at each service 100 to 200 ~ 2 mins
Unit tests at each service 100 to 200 ~ 1 min
Test Pyramid from an Actual Project
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Benefits of the Layered Automation Approach
1. Dependable builds
๏ Increased automation effectiveness
2. Reduced maintenance effort
๏ Reduced cost
3. Faster feedback cycle due to reduced execution time
๏ Increased efficiency of automation suite
4. Continuous integration powered by Layered Automation can instantly highlight
defective layer
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
ActivityTime: Coupon Testing with Layered Approach
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Coupon Validation Functionality
Acceptance Criteria:
AC #1:
Given I have a valid coupon
When I validate the coupon
Then coupon validation succeeds
AC #2:
Given I have an invalid coupon
When I validate the coupon
Then coupon validation fails
AC #3:
Given I have an expired coupon
When I validate the coupon
Then coupon validation fails
AC #4:
Given I have an already used coupon
When I validate the coupon
Then coupon validation fails
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Coupon Validation Test Scenarios -Layered
UI Tests
E2E Tests
1. Verify successful coupon validation
2. Verify invalid coupon results in validation error
Stubbed Tests
3. Verify not providing any input and submitting the
form, results in appropriate error message
4. Verify on providing incomplete input and
submitting the form, results in appropriate error
message
Service Tests
Integration Tests
1. Validate-coupon request for an available coupon,
results in success response
2. Validate-coupon request for invalid coupon,
results in error response
3. Validate-coupon request for an expired coupon,
results in error response
4. Validate-coupon request for an already used
coupon, results in error response
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Q & A
ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
Thanks for joining
- Christopher Rex,
ThoughtWorks

Weitere ähnliche Inhalte

Was ist angesagt?

Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
Mike McGarr
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 

Was ist angesagt? (20)

Integration Testing in Python
Integration Testing in PythonIntegration Testing in Python
Integration Testing in Python
 
Jenkins as the Test Reporting Framework
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting Framework
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
TELERIK COURSE
TELERIK COURSETELERIK COURSE
TELERIK COURSE
 
Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021
 
A Look into Automated Web UI Test
A Look into Automated Web UI TestA Look into Automated Web UI Test
A Look into Automated Web UI Test
 
Codeception
CodeceptionCodeception
Codeception
 
Realtime selenium interview questions
Realtime selenium interview questionsRealtime selenium interview questions
Realtime selenium interview questions
 
Test & behavior driven development
Test & behavior driven developmentTest & behavior driven development
Test & behavior driven development
 
Efficient JavaScript Unit Testing, JavaOne China 2013
Efficient JavaScript Unit Testing, JavaOne China 2013Efficient JavaScript Unit Testing, JavaOne China 2013
Efficient JavaScript Unit Testing, JavaOne China 2013
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and Developers
 
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrsAjit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSource
 
Unit & integration testing
Unit & integration testingUnit & integration testing
Unit & integration testing
 
Performance Testing | Instamojo
Performance Testing | InstamojoPerformance Testing | Instamojo
Performance Testing | Instamojo
 
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016Acceptance & Functional Testing with Codeception - SunshinePHP 2016
Acceptance & Functional Testing with Codeception - SunshinePHP 2016
 

Ähnlich wie Understanding Layers of Testing

Hrishikesh_iitg_internship_report
Hrishikesh_iitg_internship_reportHrishikesh_iitg_internship_report
Hrishikesh_iitg_internship_report
Hrishikesh Malakar
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
Anna Russo
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
Anna Russo
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
Anna Russo
 
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
Anna Russo
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
Dynatrace
 

Ähnlich wie Understanding Layers of Testing (20)

Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023
 
Hrishikesh_iitg_internship_report
Hrishikesh_iitg_internship_reportHrishikesh_iitg_internship_report
Hrishikesh_iitg_internship_report
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
 
Quality of life through Unit Testing
Quality of life through Unit TestingQuality of life through Unit Testing
Quality of life through Unit Testing
 
Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023
 
13090016_vectorcast.ppt
13090016_vectorcast.ppt13090016_vectorcast.ppt
13090016_vectorcast.ppt
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2010 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Test Design for Fully Automated Build Architectures
Test Design for Fully Automated Build ArchitecturesTest Design for Fully Automated Build Architectures
Test Design for Fully Automated Build Architectures
 
Testing in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita GalkinTesting in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita Galkin
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test Pyramid
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
qTest <> TestProject Integration Webinar
qTest <> TestProject Integration WebinarqTest <> TestProject Integration Webinar
qTest <> TestProject Integration Webinar
 
From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]From 0 to DevOps in 80 Days [Webinar Replay]
From 0 to DevOps in 80 Days [Webinar Replay]
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Upstream testing.
Upstream testing.Upstream testing.
Upstream testing.
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Understanding Layers of Testing

  • 1. Understanding Layers of Testing By Christopher Rex, ThoughtWorks ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 3. Challenge What can be a sensible test approach? ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 4. Evolution of Automated Testing ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 5. Challenge How to build an efficient automation suite? ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 6. Problems What can be a sensible test approach? How to build an efficient automation suite? ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 9. How to proceed? 1. Build a deeper understanding of AUT ๏ Layered approach to testing 2. Test for the right logic in the right layer ๏ Sensible functional testing ๏ Efficient automation testing ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/ Demo code - https://github.com/christopher-rex/sample-test-pyramid
  • 10. QuickTour of AUT ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 11. ActivityTime: List test scenarios ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 12. Login Functionality Acceptance Criteria: AC #1: Given I am a registered user And my email account has been verified When I login to the application Then login succeeds AC #2: Given I am not a registered user When I login to the application Then login fails AC #3: Given I am a registered user And my email has not been verified yet When I login to the application Then login succeeds with a prompt to verify email AC #4: Given I am a registered user And my email account has been verified And my account has been disabled When I login to the application Then login fails ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 13. Login Test Scenarios 1. Verify successful login 2. Verify on providing an email-id of user not registered, login fails with an appropriate error message 3. Verify not providing any input and submitting the form, results in appropriate error message 4. Verify on providing partial input say email-id or password and submitting the form, results in appropriate error message 5. Verify on providing incomplete email-id, login fails with an appropriate error message 6. Verify on providing an email-id of a disabled user and submitting the form, login fails with an appropriate error message 7. Verify on providing an email-id of user whose account is not verified, login succeeds with an appropriate warning message ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 14. Testing Approach 1. How can we approach testing this user-authentication feature? 2. Do we have enough information to define a testing approach? ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 15. Understanding Application Architecture ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 16. Testing E2E layer ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 17. Testing Service layer ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 18. Testing UI layer with a stubbed server ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 19. Summary of Testing approach ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 20. ActivityTime: Layer the scenarios ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 21. Login Test Scenarios -Layered UI Tests E2E Tests 1. Verify successful login 2. Verify on providing an email-id of user not registered, login fails with an appropriate error message Stubbed Tests 3. Verify not providing any input and submitting the form, results in appropriate error message 4. Verify on providing partial input say email-id or password and submitting the form, results in appropriate error message Service Tests Integration Tests 1. Verify valid login results in success response 2. Verify login request with email-id of an unregistered user, results in error response 3. Verify login request with email-id of a disabled user, results in error response 4. Verify login request with an unverified email-id, results in error response with appropriate response body ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 22. Applying Layered Testing Approach ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 23. Benefits of the Layered Testing Approach 1. Deeper understanding of responsibility/functionality of each layer ๏ Sensible testing ๏ Increased value of QA feedback ๏ Opens-out opportunities to do more NFR testing 2. Independent testing at each layer ๏ Uninterrupted development ๏ Testing edge cases with ease 3. Defects can be reported with analysis information ๏ Reduced time-to-fix 4. Reused logic can be tested only once ๏ Reduced testing time ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 24. Application Architecture: Unit layer ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 26. Test Automation -Layered ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 27. Test layer Number of tests Execution time Last mile (Extension of E2E to include integration with legacy systems) 3 ~ 10 mins E2E tests ~30 ~ 15 mins Stubbed webapp tests ~280 ~ 20 mins (4 parallel threads with 70 tests per thread) Integration tests at each service 100 to 200 ~ 2 mins Unit tests at each service 100 to 200 ~ 1 min Test Pyramid from an Actual Project ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 28. Benefits of the Layered Automation Approach 1. Dependable builds ๏ Increased automation effectiveness 2. Reduced maintenance effort ๏ Reduced cost 3. Faster feedback cycle due to reduced execution time ๏ Increased efficiency of automation suite 4. Continuous integration powered by Layered Automation can instantly highlight defective layer ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 29. ActivityTime: Coupon Testing with Layered Approach ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 30. Coupon Validation Functionality Acceptance Criteria: AC #1: Given I have a valid coupon When I validate the coupon Then coupon validation succeeds AC #2: Given I have an invalid coupon When I validate the coupon Then coupon validation fails AC #3: Given I have an expired coupon When I validate the coupon Then coupon validation fails AC #4: Given I have an already used coupon When I validate the coupon Then coupon validation fails ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 31. Coupon Validation Test Scenarios -Layered UI Tests E2E Tests 1. Verify successful coupon validation 2. Verify invalid coupon results in validation error Stubbed Tests 3. Verify not providing any input and submitting the form, results in appropriate error message 4. Verify on providing incomplete input and submitting the form, results in appropriate error message Service Tests Integration Tests 1. Validate-coupon request for an available coupon, results in success response 2. Validate-coupon request for invalid coupon, results in error response 3. Validate-coupon request for an expired coupon, results in error response 4. Validate-coupon request for an already used coupon, results in error response ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 32. Q & A ThoughtWorks, http://twchennai.github.io/VODQA-Chennai/
  • 33. Thanks for joining - Christopher Rex, ThoughtWorks