SlideShare a Scribd company logo
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

More Related Content

What's hot

Integration Testing in Python
Integration Testing in PythonIntegration Testing in Python
Integration Testing in Python
Panoptic Development, Inc.
 
Jenkins as the Test Reporting Framework
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting Framework
Nitin Sharma
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Babul Mirdha
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
didev
 
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.
Matt Eland
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery appliedMike McGarr
 
TELERIK COURSE
TELERIK COURSETELERIK COURSE
TELERIK COURSE
ISB Vietnam Corporation
 
Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021
Paco van Beckhoven
 
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
Dhananjay Kumar
 
Codeception
CodeceptionCodeception
Codeception
Jonathan Lau
 
Realtime selenium interview questions
Realtime selenium interview questionsRealtime selenium interview questions
Realtime selenium interview questions
Kuldeep Pawar
 
Test & behavior driven development
Test & behavior driven developmentTest & behavior driven development
Test & behavior driven development
Tristan Libersat
 
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
Hazem Saleh
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationamscanne
 
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
Katalon Studio
 
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrsAjit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
Ajit Jadhav
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSource
Oleksii Prohonnyi
 
Unit & integration testing
Unit & integration testingUnit & integration testing
Unit & integration testing
Pavlo Hodysh
 
Performance Testing | Instamojo
Performance Testing | InstamojoPerformance Testing | Instamojo
Performance Testing | Instamojo
Mohit Shukla
 
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
Joe Ferguson
 

What's hot (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
 

Similar to Understanding Layers of Testing

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
Scott Keck-Warren
 
Hrishikesh_iitg_internship_report
Hrishikesh_iitg_internship_reportHrishikesh_iitg_internship_report
Hrishikesh_iitg_internship_reportHrishikesh 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 TrainingAnna Russo
 
Quality of life through Unit Testing
Quality of life through Unit TestingQuality of life through Unit Testing
Quality of life through Unit Testing
Sian Lerk Lau
 
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
Scott Keck-Warren
 
13090016_vectorcast.ppt
13090016_vectorcast.ppt13090016_vectorcast.ppt
13090016_vectorcast.ppt
Karthika Keshav
 
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
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"
Fwdays
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
Dominik Dary
 
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
Melissa Benua
 
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
Sigma Software
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test Pyramid
Elias Nogueira
 
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
Scott Keck-Warren
 
qTest <> TestProject Integration Webinar
qTest <> TestProject Integration WebinarqTest <> TestProject Integration Webinar
qTest <> TestProject Integration Webinar
Kevin Dunne
 
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
 
Software Testing
Software TestingSoftware Testing
Software Testing
AdroitLogic
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
IlPeach
 
Upstream testing.
Upstream testing.Upstream testing.
Upstream testing.
Mindtree Ltd.
 

Similar to 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.
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

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