SlideShare una empresa de Scribd logo
1 de 43
Developing an
Automated
Testing Strategy
Jon Kruger
(@JonKruger)
Forget everything you know
Why do we build software?
Why do we test software?
The real purpose of testing is to make sure that our
software is achieving the goals that caused us to
build it in the first place.
Acceptance Criteria
Acceptance Criteria Mythbusters
Acceptance Criteria –
America’s Test Kitchen
Types of tests
Unit Tests
Good:

Bad:

Run fast

Don’t test the
interaction between
components

Test code in isolation
Less brittle
Integration Tests
Good:

Bad:

Test the components
of the system working
together

Slower

May test interaction
with external systems

More brittle
Might only test part of
the system working
together
Test data setup might
be difficult
Acceptance Tests
Good:

Bad:

Test the entire
application end to end

Slower

Often written in plain
English (“gherkin”
syntax)
Test the actions that
real users will do

Not good for testing
every combination of
possibilities
Manual Tests
Good:

Bad:

Testing subjective
things (look and feel,
overall user
experience)

Very time consuming

Exploratory testing – try
and break the app

Not easily repeatable
Doesn’t scale well as
the application grows
Security Tests
Make sure the application is not vulnerable
to hacking or unauthorized access
Load Tests/Performance Tests
Test how the application behaves under a
certain amount of stress
User Acceptance Testing
Do the users agree that what you have built
will meet their needs?
A/B Testing
Which of these layouts/colors/approaches
get better results?
Choosing a test strategy
… is a TEAM thing!
Test Strategy – Micro Level
How are we (the team) going to test this
feature?
The Three Amigos
The “Gherkin” Syntax
Given I am a logged in user
When I go to the final checkout page
Then I should see the total cost of the order
broken down by product cost, tax, and
shipping charges
And I should see the total cost of the order
Feature: Process an order
Given I am a logged in user
When I go to the final checkout page
Then I should see the total cost of the order broken down
by product cost, tax, and shipping charges
And I should see the total cost of the order



Order total = total cost of products on the order + tax +
shipping charges
Tax:






Ohio = 7%
Michigan = 6.5%
Other states = 0%

Shipping:


If total cost of products (before tax >= $25), shipping is free,
otherwise $5
Feature: Process an order
Given I am a logged in user
When I go to the final checkout page
Then I should see the total cost of the order broken down
by product cost, tax, and shipping charges
And I should see the total cost of the order



Order total = total cost of products on the order + tax +
shipping charges
Tax:










Based on the shipping address, not the billing address
Tax charged on the sum of the cost of the products
Ohio = 7%
Michigan = 6.5%
Other states (including DC) = 0%
No shipping internationally

Shipping:


If total cost of products (before tax) >= $25, shipping is
free, otherwise $5
Feature: Process an order –
Testing Notes
We’ll test the following scenarios:






Order with multiple products
Ship to OH, MI, DC
Unit tests to verify tax calculation for all 51
states
Shipping < $25, = $25, > $25
Verify order totals
Feature: Process an order –
Testing Notes
Products

Tax

Shipping

Order with one
product

Ship to Ohio (7% tax)

Cost of product =
$24.99 (shipping is $5)

Order with one
product

Ship to Michigan
(6.5% tax)

Cost of product = $25
(shipping is free)

Order with multiple
products

Ship to DC, billing
address is Ohio (0%
tax)

Cost of products =
$25.01 (shipping is
free)

Verifications
Total cost = sum of cost of products + tax + shipping
Feature: Process an order –
Acceptance Criteria
Scenario: Order with one product, ship to OH, total
product cost < $25
Given I am a logged in user
And the shopping cart is empty
And I add a product costing $24.99 to the cart
And my shipping state is OH
And my billing state is OH
When I go to the final checkout page
Then the tax amount should be $1.75
And the shipping amount should be $5.00
And the order total should be $31.74
Risk vs. Cost Mapping
High

High risk,
easy to test

High risk,
hard to test

Low
risk, easy to
test

Low risk,
hard to test

Risk

Low

Low

Cost

High
Questions to ask
 What

will happen if this feature doesn’t
work as designed?
 What is the cost of NOT automating this
test?
 What will it cost to test this in the way that
we want to test it? Is it worth it?
Test Strategy – Macro Level
How are we (the team) going to test this
application?
What is the best use of our time and
resources given the constraints that we
have (type of application, people, skills,
time, etc.)?
Testing Myth #1
It’s QA’s job to come up with the testing
plan.
Testing Myth #2
We should have X% test coverage.
Testing Myth #3
We don’t have time for automated testing.
Testing Myth #4
We can only have one testing strategy for
our application.
The Automated Testing
Triangle
Questions to ask
 What

are the areas of the application
that are most likely to fail?
 What are the areas or the application
that will cause the most damage if they
fail?
 What is the smartest way we can test the
application given our people, skills, tools,
and time?
 If we had no constraints, what would be
the best way to test the application?
Types of Tests
 Unit

tests
 Integration tests
 Acceptance Tests
 Manual tests

 Security

tests
 Load/performance tests
 User acceptance testing
 A/B testing
How would you test…
An internal line-of-business application with
20 users (not mission-critical)
How would you test…
Your bank’s website for accessing your
checking account
 View balance and recent activity
 Pay bills
 Perform customer service functions
How would you test…
A back-end transaction processing system
 Processes 100000 transactions per day
 No user interface
How would you test…
A startup competitor to Instagram
How would you test…
The computer in a car
How would you test…
The space shuttle
How would you test…
An e-commerce site for a clothing store
Slides and contact info
Slides:
http://jonkruger.com,
click on Presentations
Email: jon@jonkruger.com
Twitter: @JonKruger
Blog: http://jonkruger.com

Más contenido relacionado

Destacado

How to make your own beaded hair accessories
How to make your own beaded hair accessoriesHow to make your own beaded hair accessories
How to make your own beaded hair accessoriesArthur Bonilla
 
White paper on testing in cloud
White paper on testing in cloudWhite paper on testing in cloud
White paper on testing in cloudimkulu
 
2010 Newsletters
2010 Newsletters2010 Newsletters
2010 NewslettersNRAGroupLLC
 
Test Process Improvement
Test Process ImprovementTest Process Improvement
Test Process ImprovementMomentum NI
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)Alvaro Sanchez-Mariscal
 
Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...SQALab
 
Cutting costs, improving quality, & speeding delivery through continous impro...
Cutting costs, improving quality, & speeding delivery through continous impro...Cutting costs, improving quality, & speeding delivery through continous impro...
Cutting costs, improving quality, & speeding delivery through continous impro...Eng Marzouk
 
Panda bear primary research 2
Panda bear primary research 2Panda bear primary research 2
Panda bear primary research 2cloestead
 

Destacado (10)

How to make your own beaded hair accessories
How to make your own beaded hair accessoriesHow to make your own beaded hair accessories
How to make your own beaded hair accessories
 
White paper on testing in cloud
White paper on testing in cloudWhite paper on testing in cloud
White paper on testing in cloud
 
2010 Newsletters
2010 Newsletters2010 Newsletters
2010 Newsletters
 
Test Process Improvement
Test Process ImprovementTest Process Improvement
Test Process Improvement
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
 
From QA To Dev-QA-Ops
From QA To Dev-QA-OpsFrom QA To Dev-QA-Ops
From QA To Dev-QA-Ops
 
Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...Test Process Improvement with TPI NEXT - what the model does not tell you but...
Test Process Improvement with TPI NEXT - what the model does not tell you but...
 
Cutting costs, improving quality, & speeding delivery through continous impro...
Cutting costs, improving quality, & speeding delivery through continous impro...Cutting costs, improving quality, & speeding delivery through continous impro...
Cutting costs, improving quality, & speeding delivery through continous impro...
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Panda bear primary research 2
Panda bear primary research 2Panda bear primary research 2
Panda bear primary research 2
 

Similar a Developing an Automated Testing Strategy

Developing an Automated Testing Strategy
Developing an Automated Testing StrategyDeveloping an Automated Testing Strategy
Developing an Automated Testing StrategyJon Kruger
 
Jon Kruger - A Whole Team Approach To Testing
Jon Kruger - A Whole Team Approach To TestingJon Kruger - A Whole Team Approach To Testing
Jon Kruger - A Whole Team Approach To TestingQA or the Highway
 
Data-Driven Decision Making by Expedia Sr PM
Data-Driven Decision Making by Expedia Sr PMData-Driven Decision Making by Expedia Sr PM
Data-Driven Decision Making by Expedia Sr PMProduct School
 
Anton Muzhailo - Practical Test Process Improvement using ISTQB
Anton Muzhailo - Practical Test Process Improvement using ISTQBAnton Muzhailo - Practical Test Process Improvement using ISTQB
Anton Muzhailo - Practical Test Process Improvement using ISTQBIevgenii Katsan
 
6 Guidelines for A/B Testing
6 Guidelines for A/B Testing6 Guidelines for A/B Testing
6 Guidelines for A/B TestingEmily Robinson
 
Simon Peter Schrijver: Exploratory Testing Live
Simon Peter Schrijver: Exploratory Testing LiveSimon Peter Schrijver: Exploratory Testing Live
Simon Peter Schrijver: Exploratory Testing LiveAnna Royzman
 
Taming The HiPPO
Taming The HiPPOTaming The HiPPO
Taming The HiPPOGoogle A/NZ
 
Fundamentals_of_Software_testing.pptx
Fundamentals_of_Software_testing.pptxFundamentals_of_Software_testing.pptx
Fundamentals_of_Software_testing.pptxMusaBashir9
 
Procure to Pay Process Tax Compliance Improvement Guidelines - Webinar
Procure to Pay Process Tax Compliance Improvement Guidelines - WebinarProcure to Pay Process Tax Compliance Improvement Guidelines - Webinar
Procure to Pay Process Tax Compliance Improvement Guidelines - WebinarSovos
 
The Role Of The Sqa In Software Development By Jim Coleman
The Role Of The Sqa In Software Development By Jim ColemanThe Role Of The Sqa In Software Development By Jim Coleman
The Role Of The Sqa In Software Development By Jim ColemanJames Coleman
 
Validation and hypothesis based product management by Abdallah Al-Khalidi
Validation and hypothesis based  product management by Abdallah Al-KhalidiValidation and hypothesis based  product management by Abdallah Al-Khalidi
Validation and hypothesis based product management by Abdallah Al-KhalidiAbdallah Al-Khalidi
 
The anatomy of an A/B Test - JSConf Colombia Workshop
The anatomy of an A/B Test - JSConf Colombia WorkshopThe anatomy of an A/B Test - JSConf Colombia Workshop
The anatomy of an A/B Test - JSConf Colombia WorkshopEduardo Shiota Yasuda
 
Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...
Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...
Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...Nimonik
 
Unproctored Testing
Unproctored TestingUnproctored Testing
Unproctored Testingjasminloi
 

Similar a Developing an Automated Testing Strategy (20)

Developing an Automated Testing Strategy
Developing an Automated Testing StrategyDeveloping an Automated Testing Strategy
Developing an Automated Testing Strategy
 
Jon Kruger - A Whole Team Approach To Testing
Jon Kruger - A Whole Team Approach To TestingJon Kruger - A Whole Team Approach To Testing
Jon Kruger - A Whole Team Approach To Testing
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
QA overview
QA overviewQA overview
QA overview
 
Data-Driven Decision Making by Expedia Sr PM
Data-Driven Decision Making by Expedia Sr PMData-Driven Decision Making by Expedia Sr PM
Data-Driven Decision Making by Expedia Sr PM
 
Testing plan for an ecommerce site
Testing plan for an ecommerce siteTesting plan for an ecommerce site
Testing plan for an ecommerce site
 
Anton Muzhailo - Practical Test Process Improvement using ISTQB
Anton Muzhailo - Practical Test Process Improvement using ISTQBAnton Muzhailo - Practical Test Process Improvement using ISTQB
Anton Muzhailo - Practical Test Process Improvement using ISTQB
 
SWQ
SWQSWQ
SWQ
 
6 Guidelines for A/B Testing
6 Guidelines for A/B Testing6 Guidelines for A/B Testing
6 Guidelines for A/B Testing
 
Simon Peter Schrijver: Exploratory Testing Live
Simon Peter Schrijver: Exploratory Testing LiveSimon Peter Schrijver: Exploratory Testing Live
Simon Peter Schrijver: Exploratory Testing Live
 
Taming The HiPPO
Taming The HiPPOTaming The HiPPO
Taming The HiPPO
 
Fundamentals_of_Software_testing.pptx
Fundamentals_of_Software_testing.pptxFundamentals_of_Software_testing.pptx
Fundamentals_of_Software_testing.pptx
 
Procure to Pay Process Tax Compliance Improvement Guidelines - Webinar
Procure to Pay Process Tax Compliance Improvement Guidelines - WebinarProcure to Pay Process Tax Compliance Improvement Guidelines - Webinar
Procure to Pay Process Tax Compliance Improvement Guidelines - Webinar
 
The Role Of The Sqa In Software Development By Jim Coleman
The Role Of The Sqa In Software Development By Jim ColemanThe Role Of The Sqa In Software Development By Jim Coleman
The Role Of The Sqa In Software Development By Jim Coleman
 
Validation and hypothesis based product management by Abdallah Al-Khalidi
Validation and hypothesis based  product management by Abdallah Al-KhalidiValidation and hypothesis based  product management by Abdallah Al-Khalidi
Validation and hypothesis based product management by Abdallah Al-Khalidi
 
Test cases
Test casesTest cases
Test cases
 
Core Knowledge about QMS
Core Knowledge about QMSCore Knowledge about QMS
Core Knowledge about QMS
 
The anatomy of an A/B Test - JSConf Colombia Workshop
The anatomy of an A/B Test - JSConf Colombia WorkshopThe anatomy of an A/B Test - JSConf Colombia Workshop
The anatomy of an A/B Test - JSConf Colombia Workshop
 
Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...
Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...
Comprehensive Compliance for Environmental, Safety, Quality Requirements in C...
 
Unproctored Testing
Unproctored TestingUnproctored Testing
Unproctored Testing
 

Más de Jon Kruger

The Business of You: 10 Steps To Run Your Career Like a Business
The Business of You: 10 Steps To Run Your Career Like a BusinessThe Business of You: 10 Steps To Run Your Career Like a Business
The Business of You: 10 Steps To Run Your Career Like a BusinessJon Kruger
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperJon Kruger
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptJon Kruger
 
Productivity Boosters for .NET Developers
Productivity Boosters for .NET DevelopersProductivity Boosters for .NET Developers
Productivity Boosters for .NET DevelopersJon Kruger
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In ActionJon Kruger
 
Advanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesAdvanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesJon Kruger
 
Solid Software Design Principles
Solid Software Design PrinciplesSolid Software Design Principles
Solid Software Design PrinciplesJon Kruger
 

Más de Jon Kruger (7)

The Business of You: 10 Steps To Run Your Career Like a Business
The Business of You: 10 Steps To Run Your Career Like a BusinessThe Business of You: 10 Steps To Run Your Career Like a Business
The Business of You: 10 Steps To Run Your Career Like a Business
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScript
 
Productivity Boosters for .NET Developers
Productivity Boosters for .NET DevelopersProductivity Boosters for .NET Developers
Productivity Boosters for .NET Developers
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Advanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID PrinciplesAdvanced Object-Oriented/SOLID Principles
Advanced Object-Oriented/SOLID Principles
 
Solid Software Design Principles
Solid Software Design PrinciplesSolid Software Design Principles
Solid Software Design Principles
 

Último

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Developing an Automated Testing Strategy

  • 3. Why do we build software?
  • 4. Why do we test software? The real purpose of testing is to make sure that our software is achieving the goals that caused us to build it in the first place.
  • 9. Unit Tests Good: Bad: Run fast Don’t test the interaction between components Test code in isolation Less brittle
  • 10. Integration Tests Good: Bad: Test the components of the system working together Slower May test interaction with external systems More brittle Might only test part of the system working together Test data setup might be difficult
  • 11. Acceptance Tests Good: Bad: Test the entire application end to end Slower Often written in plain English (“gherkin” syntax) Test the actions that real users will do Not good for testing every combination of possibilities
  • 12. Manual Tests Good: Bad: Testing subjective things (look and feel, overall user experience) Very time consuming Exploratory testing – try and break the app Not easily repeatable Doesn’t scale well as the application grows
  • 13. Security Tests Make sure the application is not vulnerable to hacking or unauthorized access
  • 14. Load Tests/Performance Tests Test how the application behaves under a certain amount of stress
  • 15. User Acceptance Testing Do the users agree that what you have built will meet their needs?
  • 16. A/B Testing Which of these layouts/colors/approaches get better results?
  • 17. Choosing a test strategy … is a TEAM thing!
  • 18. Test Strategy – Micro Level How are we (the team) going to test this feature?
  • 20. The “Gherkin” Syntax Given I am a logged in user When I go to the final checkout page Then I should see the total cost of the order broken down by product cost, tax, and shipping charges And I should see the total cost of the order
  • 21. Feature: Process an order Given I am a logged in user When I go to the final checkout page Then I should see the total cost of the order broken down by product cost, tax, and shipping charges And I should see the total cost of the order   Order total = total cost of products on the order + tax + shipping charges Tax:     Ohio = 7% Michigan = 6.5% Other states = 0% Shipping:  If total cost of products (before tax >= $25), shipping is free, otherwise $5
  • 22. Feature: Process an order Given I am a logged in user When I go to the final checkout page Then I should see the total cost of the order broken down by product cost, tax, and shipping charges And I should see the total cost of the order   Order total = total cost of products on the order + tax + shipping charges Tax:        Based on the shipping address, not the billing address Tax charged on the sum of the cost of the products Ohio = 7% Michigan = 6.5% Other states (including DC) = 0% No shipping internationally Shipping:  If total cost of products (before tax) >= $25, shipping is free, otherwise $5
  • 23. Feature: Process an order – Testing Notes We’ll test the following scenarios:      Order with multiple products Ship to OH, MI, DC Unit tests to verify tax calculation for all 51 states Shipping < $25, = $25, > $25 Verify order totals
  • 24. Feature: Process an order – Testing Notes Products Tax Shipping Order with one product Ship to Ohio (7% tax) Cost of product = $24.99 (shipping is $5) Order with one product Ship to Michigan (6.5% tax) Cost of product = $25 (shipping is free) Order with multiple products Ship to DC, billing address is Ohio (0% tax) Cost of products = $25.01 (shipping is free) Verifications Total cost = sum of cost of products + tax + shipping
  • 25. Feature: Process an order – Acceptance Criteria Scenario: Order with one product, ship to OH, total product cost < $25 Given I am a logged in user And the shopping cart is empty And I add a product costing $24.99 to the cart And my shipping state is OH And my billing state is OH When I go to the final checkout page Then the tax amount should be $1.75 And the shipping amount should be $5.00 And the order total should be $31.74
  • 26. Risk vs. Cost Mapping High High risk, easy to test High risk, hard to test Low risk, easy to test Low risk, hard to test Risk Low Low Cost High
  • 27. Questions to ask  What will happen if this feature doesn’t work as designed?  What is the cost of NOT automating this test?  What will it cost to test this in the way that we want to test it? Is it worth it?
  • 28. Test Strategy – Macro Level How are we (the team) going to test this application? What is the best use of our time and resources given the constraints that we have (type of application, people, skills, time, etc.)?
  • 29. Testing Myth #1 It’s QA’s job to come up with the testing plan.
  • 30. Testing Myth #2 We should have X% test coverage.
  • 31. Testing Myth #3 We don’t have time for automated testing.
  • 32. Testing Myth #4 We can only have one testing strategy for our application.
  • 34. Questions to ask  What are the areas of the application that are most likely to fail?  What are the areas or the application that will cause the most damage if they fail?  What is the smartest way we can test the application given our people, skills, tools, and time?  If we had no constraints, what would be the best way to test the application?
  • 35. Types of Tests  Unit tests  Integration tests  Acceptance Tests  Manual tests  Security tests  Load/performance tests  User acceptance testing  A/B testing
  • 36. How would you test… An internal line-of-business application with 20 users (not mission-critical)
  • 37. How would you test… Your bank’s website for accessing your checking account  View balance and recent activity  Pay bills  Perform customer service functions
  • 38. How would you test… A back-end transaction processing system  Processes 100000 transactions per day  No user interface
  • 39. How would you test… A startup competitor to Instagram
  • 40. How would you test… The computer in a car
  • 41. How would you test… The space shuttle
  • 42. How would you test… An e-commerce site for a clothing store
  • 43. Slides and contact info Slides: http://jonkruger.com, click on Presentations Email: jon@jonkruger.com Twitter: @JonKruger Blog: http://jonkruger.com

Notas del editor

  1. I want you to forget everything that you think you already know about how to test software so that we can take an objective look at how we should test software. We all have preconceptions about how testing should be done, maybe from a book you read, or how you do it at work or how you’ve seen it done in the past.
  2. Make moneyMeet some needMake users happy
  3. We don’t want it to break, we want to make sure it’s meeting the needs of the business, we don’t want bugs, etc.The goal of testing is the same as the goal of writing the codeWHICH REALLY MEANS… we don’t want to lose money, we want users to stay happy, etc.
  4. What do we expect this feature to do?What is acceptable behavior for this feature?How do we know when we are done?
  5. What things are important when testing the taste of food?
  6. Example: test calculation of tax based on the state a product is being shipped to
  7. Example: save a record to the database, then load it back out and see that the data is as you would expect
  8. Example: user logs in, adds a product to the cart, and then checks out
  9. This is a TEAM THING, not just QA’s jobDevelopers have a certain set of skills, and QA testers have different sets of skills. We want to make the best use of everyone’s skills to test the application effectively and efficiently.
  10. Get BAs, QAs, and developers together and decide on acceptance criteria for the feature as well as how you will test itExample: http://www.youtube.com/watch?v=zrzMhU_4m-g&amp;list=FLY4Oz73XkH0qNK1trlSxPNQ&amp;index=1
  11. Regardless of how you get there, make sure you have acceptance criteria before you start coding! Otherwise you don’t really know what it is that you’re building. If your BA or QA don’t give you acceptance criteria, write them out yourself.
  12. This is as far as we go in our initial 3 amigos meeting. At this point we’ll break and someone will write out the gherkin for the acceptance tests and then we’ll review the gherkin once it’s written (no need for us all to sit in a room and watch someone type out gherkin).
  13. Combine all of the scenarios so that we can have fewer automated tests to write.
  14. - This gherkin essentiallybecomes our requirements, our test plan, our method of verifying that our feature will meet the needs of the business, and potentially an automated acceptance test.- The gherkin can be written by anyone on the team. The 3 amigos must all agree on the final gherkin.- Bonus points if you can get people in the business to write requirements for you in this format!
  15. Is this test worth automating?Is it worth it to test this at all?
  16. Picking an arbitrary number as a threshold for test coverage doesn’t lead to you making the smartest choices. We should look at each piece of functionality and decide how it should be tested (or not tested).
  17. That’s why we’re here – we going to take an objective look at how to make the best use of our time.
  18. You might decide to do lots of automated testing against your service layer and only manual testing and some happy flow automated web tests for the front end.
  19. The textbook definition of how testing should be done. But does this make sense for you? There’s a good chance that it does, but we should think about this a bit.
  20. #4 – realistically, we all have constraints. But maybe we can change the constraints. If we don’t have the right people, maybe we need to add team members with different skill sets (or just more people). If we don’t have a tool we need, maybe we should get it. If we don’t have skills, maybe we should get training.
  21. You might decide to do lots of automated testing against your service layer and only manual testing and some happy flow automated web tests for the front end.
  22. How long do we expect this application to be around? (Or, is this a short-term throwaway solution or something we expect to use for a long time?)How often is it going to change?