SlideShare une entreprise Scribd logo
1  sur  52
Télécharger pour lire hors ligne
STRATEGIC TESTING
@DmitrySharkov
WHAT IS A TEST STRATEGY?
SYMPTOMS OF POOR TEST STRATEGY
IT’S NOT NECESSARILY LOW QUALITY.
IT’S THE COST OF HIGH QUALITY.
TEST SMARTER, NOT HARDER.
test the right things
at the right time
with the right tools
TESTING TOOLBOX — TYPES OF TESTS
•unit (small)

•integration (medium)

•end-to-end (large automated)

•end-to-end (large manual)

•unscripted/sapient

•nonfunctional ("-ility") tests
Test Type Sample Technologies
UNIT JUnit, RSpec, NUnit, Spock, Mockito, Jasmine, Mocha
INTEGRATION same as above; custom
MANUAL E2E HP Quality Center, Gherkin, unstructured
AUTOMATED E2E HP Unified Functional Testing, Cucumber, custom
UNSCRIPTED unstructured
"ILITY" TESTS Gatling, sqlmap, Selenium Grid, WAVE
TESTING TOOLBOX — TECHNOLOGIES
WE HAVE THE TOOLS. HOW DO WE USE THEM?
GOOD TEST STRATEGY
• Minimizes waste.

• Puts burden of testing primarily on devs.

• Sustainable.

• Repeatable.

• Yields tests that maximize speed of
feedback, reliability, and focus.
PROPERTIES OF A GOOD TEST STRATEGY
• Favor tighter feedback loops.

• Think in terms of unknowns.

• Automate, automate, automate.

• Avoid redundancy.

• Don't be redundant.

• Address nonfunctional requirements early.
PRINCIPLES OF TEST STRATEGY (VERSION 0.3.4)
Principle 1
Favor tighter feedback loops.
Principle 1
Favor tighter feedback loops.
CostandRuntime
Test Type
lower order higher order
Principle 1
Favor tighter feedback loops.
Testing whether a seat belt locking mechanism works…
Principle 2
Think in terms of unknowns.
• unit tests?
• service-level integration tests?
• basic end-to-end automated tests?
• testing Safari on iOS?
• testing against production data?
What questions do you answer with…
Principle 2
Think in terms of unknowns.
• acceptance criteria — are they met?
• architecture — is integration exercised?
• environments — how is app affected?
• non-functional reqs — are they met?
• ??? (unknown unknowns)
What raises questions?
(What are sources of unknowns?)
Principle 3
Automate, automate, automate.
Except for…
• Look and feel tests (maybe)

• Graphical consistency tests

• Wildly complex integrations

• Tests with risky side effects

• Stuff too hard to automate
Principle 3
Automate, automate, automate.
NO AUTOMATION FOR U
Principle 4
Avoid redundancy.
Across Test Levels
Across Platforms
Across Environments
Within Test Level
Principle 4
Avoid redundancy.
Track integration points.
ServiceController
Data
Store
? ?
Principle 5
Address nonfunctional
requirements early.
Applying Strategy… Tactics!
•Coverage of all acceptance criteria.
•Sufficient coverage of non-functional requirements.
•Fast combined run of tests. (Fast feedback loops.)
•Inexpensive (to write and maintain) test suite.
GOALS
EXAMPLE: USER SEARCH
Search by Last Name and (optionally) First Name.
Search is a case-insensitive "wildcard" search (uses terms as substrings).
Search is unavailable when offline.
Search button is disabled unless these search criteria are met:
• If searching by Last Name only, at least 3 characters required.
• If searching by both, at least 1 character required for each.
Search ignores non-alpha characters ([^A-Za-z]).
This includes punctuation, numbers, and all "special" chars (á, ä, ñ etc.)
If a server-side error occurs, display sad emoji and error message.
…
USER SEARCH — ACCEPTANCE CRITERIA
Search by Last Name and (optionally) First Name.
Search is a case-insensitive "wildcard" search (uses terms as substrings).
Search is unavailable when offline.
…
USER SEARCH — STORY 1
Start with a conversation about unknowns.
STORY 1 — QUESTIONS TO ANSWER
• Is the user able to enter search terms and press the search button?
• If results come back from the server, do they appear correctly?
• Do results return from the server successfully?
• Where do the results appear in the UI?
• Does the search service hit the data store correctly?
• Does the app search through the data correctly…
• …based on Last Name?
• …based on Last Name + First Name?
• Does the app return search results quickly enough?
HOW DO WE ANSWER THESE?
HOW DO WE ANSWER THESE?
Unit Tests
• Is the user able to enter search terms and press the search button?
• If results come back from the server, do they appear correctly?
• Do results return from the server successfully?
• Where do the results appear in the UI?
• Does the search service hit the data store correctly?
• Does the app search through the data correctly…
• …based on Last Name?
• ….based on Last Name + First Name?
• Does the app return search results quickly enough?
Integration
Tests
E2E Tests
Performance Test
What can you isolate?
SOME ANSWERS RAISE FURTHER QUESTIONS
• Does the app return search results quickly enough?
Performance Test
NOPE
ok then…
SOME ANSWERS RAISE FURTHER QUESTIONS
• Does the search service leverage the cache properly?
New Integration Test
Service
Data
Store
Cache
USER SEARCH — NEXT STORY!
Search by Last Name and (optionally) First Name.
Search is a case-insensitive "wildcard" search (uses terms as substrings).
Search is unavailable when offline.
…
Oh! Oh! I know how to test it!
Scenario Outline: user search
Given I go to the user search page
When I search for users by <first_name> and <last_name>
Then I get back correct search results
Examples:
| first_name | last_name |
| Han | Solo |
| *k* | Skywalker |
NO!
Search is a case-insensitive "wildcard" search (uses terms as substrings).
What unknowns does this acceptance criterion raise?
Consider components and integration points.
Search
Service
Controller
Data
Store
Cache
Web
Things
Web
Voodoo
WHAT DO WE KNOW?
Does wildcard search introduce new ones?
(Avoid redundancy.)
STORY 2 — QUESTIONS TO ANSWER
• Does the search service handle wildcards correctly…
• …in the Last Name?
• …in the First Name?
• Does it pass the wildcard to the data layer properly?
Unit Tests
Integration
Tests
Favor tight feedback loops!
USER SEARCH — THIRD STORY!
Search by Last Name and (optionally) First Name.
Search is a case-insensitive "wildcard" search (uses terms as substrings).
Search is unavailable when offline.
…
Does the UI respond correctly if the server becomes unavailable?

Does the UI respond correctly if the server becomes available?
YOU DON'T NEED TO USE E2E TESTS HERE.
Simplify. Mock server responses. Inspect UI elements.
SOME RULES OF THUMB (TACTICS)
• Logic you can isolate — unit tests

• Validation

• Display logic

• Service logic

• Boundary conditions

• Medium-sized collaboration — integration tests

• Logic you cannot isolate — e2e tests
What are you testing?
WHAT YOU SHOULD END UP WITH…
• Acceptance criteria covered.
• Unknowns minimized.
• A large unit test suite.
• A medium-sized integration test suite.
• A lean end-to-end test suite.
• Focused tests without redundancies.
WHAT IT TAKES
COMMON OBSTACLES
Lack of trust.
COMMON OBSTACLES
Lack of common understanding.
COMMON OBSTACLES
Working in silos.
COMMON OBSTACLES
Lack of appropriate tools.
BACK AT WORK…
• Make a testing "pyramid" of current state.
• Put testers and implementers together
• Look for redundancy across test suites
• Move tests to as low a level as possible
• Look for signs that tests are missing
• Encourage knowledge transfer
• Start improving and never stop
Thank you!
@DmitrySharkov

Contenu connexe

Tendances

5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated TestingBhupesh Dahal
 
Writing Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designsWriting Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designslachlandonald
 
The limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzThe limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzQA or the Highway
 
SQL Server Worst Practices - EN
SQL Server Worst Practices - ENSQL Server Worst Practices - EN
SQL Server Worst Practices - ENGianluca Sartori
 
Refactoring page objects The Screenplay Pattern
Refactoring page objects   The Screenplay Pattern Refactoring page objects   The Screenplay Pattern
Refactoring page objects The Screenplay Pattern RiverGlide
 
Sustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanSustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanQA or the Highway
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium TestsMarcus Merrell
 
30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess LancasterQA or the Highway
 
Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platformChamil Madusanka
 
Software testing with examples in Angular (and AngularJS)
Software testing with examples in Angular (and AngularJS)Software testing with examples in Angular (and AngularJS)
Software testing with examples in Angular (and AngularJS)Paweł Żurowski
 
Selenium Deep Dive
Selenium Deep DiveSelenium Deep Dive
Selenium Deep DiveAnand Bagmar
 
Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Steinn 'Stan' Jónsson
 
So you think you can write a test case
So you think you can write a test caseSo you think you can write a test case
So you think you can write a test caseSrilu Balla
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Anand Bagmar
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with LaravelTyler Johnston
 
Test Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkTest Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkAnand Bagmar
 
Patterns in Test Automation
Patterns in Test AutomationPatterns in Test Automation
Patterns in Test AutomationAnand Bagmar
 
A Beginer's Guide to testing in Django
A Beginer's Guide to testing in DjangoA Beginer's Guide to testing in Django
A Beginer's Guide to testing in DjangoPsalms Kalu
 
Accessibility: Navigation, Forms, & Multimedia
Accessibility: Navigation, Forms, & MultimediaAccessibility: Navigation, Forms, & Multimedia
Accessibility: Navigation, Forms, & MultimediaKlara Schmitt
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
 

Tendances (20)

5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing
 
Writing Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designsWriting Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designs
 
The limits of unit testing by Craig Stuntz
The limits of unit testing by Craig StuntzThe limits of unit testing by Craig Stuntz
The limits of unit testing by Craig Stuntz
 
SQL Server Worst Practices - EN
SQL Server Worst Practices - ENSQL Server Worst Practices - EN
SQL Server Worst Practices - EN
 
Refactoring page objects The Screenplay Pattern
Refactoring page objects   The Screenplay Pattern Refactoring page objects   The Screenplay Pattern
Refactoring page objects The Screenplay Pattern
 
Sustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey ShannahanSustainable Automation Frameworks by Kelsey Shannahan
Sustainable Automation Frameworks by Kelsey Shannahan
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium Tests
 
30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster
 
Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platform
 
Software testing with examples in Angular (and AngularJS)
Software testing with examples in Angular (and AngularJS)Software testing with examples in Angular (and AngularJS)
Software testing with examples in Angular (and AngularJS)
 
Selenium Deep Dive
Selenium Deep DiveSelenium Deep Dive
Selenium Deep Dive
 
Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016
 
So you think you can write a test case
So you think you can write a test caseSo you think you can write a test case
So you think you can write a test case
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
 
Test Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkTest Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation Framework
 
Patterns in Test Automation
Patterns in Test AutomationPatterns in Test Automation
Patterns in Test Automation
 
A Beginer's Guide to testing in Django
A Beginer's Guide to testing in DjangoA Beginer's Guide to testing in Django
A Beginer's Guide to testing in Django
 
Accessibility: Navigation, Forms, & Multimedia
Accessibility: Navigation, Forms, & MultimediaAccessibility: Navigation, Forms, & Multimedia
Accessibility: Navigation, Forms, & Multimedia
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
 

En vedette

End to End Test Management Test Strategy Estimation and Metrics Workshop
End to End Test Management Test Strategy Estimation and Metrics WorkshopEnd to End Test Management Test Strategy Estimation and Metrics Workshop
End to End Test Management Test Strategy Estimation and Metrics WorkshopQAAgility Technologies
 
App Cloud and The Internet of Things
App Cloud and The Internet of ThingsApp Cloud and The Internet of Things
App Cloud and The Internet of ThingsSalesforce Developers
 
Manage Your Agile Development from Salesforce
Manage Your Agile Development from SalesforceManage Your Agile Development from Salesforce
Manage Your Agile Development from SalesforceSalesforce Developers
 
Implementing Test Automation: What a Manager Should Know
Implementing Test Automation: What a Manager Should KnowImplementing Test Automation: What a Manager Should Know
Implementing Test Automation: What a Manager Should KnowSoftServe
 
Complex End-to-End Testing
Complex End-to-End TestingComplex End-to-End Testing
Complex End-to-End TestingErika Barron
 
Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0
Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0
Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0COP_HHA
 
End 2-end testing of mean applications
End 2-end testing of mean applicationsEnd 2-end testing of mean applications
End 2-end testing of mean applicationsMihai-Cristian Fratila
 
QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...
QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...
QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...QAFest
 
E2E-тестирование мобильных приложений
E2E-тестирование мобильных приложенийE2E-тестирование мобильных приложений
E2E-тестирование мобильных приложенийMoscowJS
 
test plan
test plan test plan
test plan rosh26
 
End-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of TestingEnd-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of TestingJosiah Renaudin
 
Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...TEST Huddle
 
E2E Life Cycle Intelligence & Channel Strategy @ TPC
E2E Life Cycle Intelligence & Channel Strategy @ TPCE2E Life Cycle Intelligence & Channel Strategy @ TPC
E2E Life Cycle Intelligence & Channel Strategy @ TPCDavid Porter
 
Preparing and Implementing a Comprehensive ICD-10 Testing Strategy
Preparing and Implementing a Comprehensive ICD-10 Testing StrategyPreparing and Implementing a Comprehensive ICD-10 Testing Strategy
Preparing and Implementing a Comprehensive ICD-10 Testing StrategyCognizant
 
e2e frameworks - czyli kij ma dwa końce
e2e frameworks - czyli kij ma dwa końcee2e frameworks - czyli kij ma dwa końce
e2e frameworks - czyli kij ma dwa końceThe Software House
 
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorksTesting strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorksThoughtworks
 
Configuration Management
Configuration ManagementConfiguration Management
Configuration ManagementRajesh Kumar
 

En vedette (20)

End to End Test Management Test Strategy Estimation and Metrics Workshop
End to End Test Management Test Strategy Estimation and Metrics WorkshopEnd to End Test Management Test Strategy Estimation and Metrics Workshop
End to End Test Management Test Strategy Estimation and Metrics Workshop
 
App Cloud and The Internet of Things
App Cloud and The Internet of ThingsApp Cloud and The Internet of Things
App Cloud and The Internet of Things
 
Manage Your Agile Development from Salesforce
Manage Your Agile Development from SalesforceManage Your Agile Development from Salesforce
Manage Your Agile Development from Salesforce
 
Implementing Test Automation: What a Manager Should Know
Implementing Test Automation: What a Manager Should KnowImplementing Test Automation: What a Manager Should Know
Implementing Test Automation: What a Manager Should Know
 
Complex End-to-End Testing
Complex End-to-End TestingComplex End-to-End Testing
Complex End-to-End Testing
 
Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0
Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0
Session 12 Activités à venir de la CoP PSS : projet Mobilisation 2.0
 
End 2-end testing of mean applications
End 2-end testing of mean applicationsEnd 2-end testing of mean applications
End 2-end testing of mean applications
 
QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...
QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...
QA Fes 2016. Gerlof Hoekstra. E2E Testing the Ministry Of Justice Biometric I...
 
E2E-тестирование мобильных приложений
E2E-тестирование мобильных приложенийE2E-тестирование мобильных приложений
E2E-тестирование мобильных приложений
 
test plan
test plan test plan
test plan
 
End-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of TestingEnd-to-End Quality Approach: 14 Levels of Testing
End-to-End Quality Approach: 14 Levels of Testing
 
Test Planning_Arsala
Test Planning_ArsalaTest Planning_Arsala
Test Planning_Arsala
 
Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...
 
E2E Life Cycle Intelligence & Channel Strategy @ TPC
E2E Life Cycle Intelligence & Channel Strategy @ TPCE2E Life Cycle Intelligence & Channel Strategy @ TPC
E2E Life Cycle Intelligence & Channel Strategy @ TPC
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
 
Preparing and Implementing a Comprehensive ICD-10 Testing Strategy
Preparing and Implementing a Comprehensive ICD-10 Testing StrategyPreparing and Implementing a Comprehensive ICD-10 Testing Strategy
Preparing and Implementing a Comprehensive ICD-10 Testing Strategy
 
e2e frameworks - czyli kij ma dwa końce
e2e frameworks - czyli kij ma dwa końcee2e frameworks - czyli kij ma dwa końce
e2e frameworks - czyli kij ma dwa końce
 
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
 
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorksTesting strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
 
Configuration Management
Configuration ManagementConfiguration Management
Configuration Management
 

Similaire à Strategic Testing (CodeMash 2016)

STOP! You're Testing Too Much - Shawn Wallace
STOP!  You're Testing Too Much - Shawn WallaceSTOP!  You're Testing Too Much - Shawn Wallace
STOP! You're Testing Too Much - Shawn WallaceQA or the Highway
 
Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too muchShawn Wallace
 
Why Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsWhy Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsdpaulmerrill
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingSahar Nofal
 
Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)Rob Reynolds
 
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanQA or the Highway
 
Random testing
Random testingRandom testing
Random testingCan KAYA
 
Dare to Explore: Discover ET!
Dare to Explore: Discover ET!Dare to Explore: Discover ET!
Dare to Explore: Discover ET!Raj Indugula
 
Unit Testing and role of Test doubles
Unit Testing and role of Test doublesUnit Testing and role of Test doubles
Unit Testing and role of Test doublesRitesh Mehrotra
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowAdam Doyle
 
Getting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud ShaonGetting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud ShaonCefalo
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven DevelopmentPablo Villar
 
An Overview of automated testing (1)
An Overview of automated testing (1)An Overview of automated testing (1)
An Overview of automated testing (1)Rodrigo Lopes
 
Getting started with Test Driven Development
Getting started with Test Driven DevelopmentGetting started with Test Driven Development
Getting started with Test Driven DevelopmentFerdous Mahmud Shaon
 
Unit testing
Unit testingUnit testing
Unit testingPiXeL16
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfAmirMohamedNabilSale
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...TEST Huddle
 

Similaire à Strategic Testing (CodeMash 2016) (20)

STOP! You're Testing Too Much - Shawn Wallace
STOP!  You're Testing Too Much - Shawn WallaceSTOP!  You're Testing Too Much - Shawn Wallace
STOP! You're Testing Too Much - Shawn Wallace
 
Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too much
 
Why Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsWhy Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOps
 
c
cc
c
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)
 
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey Shannahan
 
Random testing
Random testingRandom testing
Random testing
 
Dare to Explore: Discover ET!
Dare to Explore: Discover ET!Dare to Explore: Discover ET!
Dare to Explore: Discover ET!
 
CPP09 - Testing
CPP09 - TestingCPP09 - Testing
CPP09 - Testing
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Unit Testing and role of Test doubles
Unit Testing and role of Test doublesUnit Testing and role of Test doubles
Unit Testing and role of Test doubles
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
 
Getting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud ShaonGetting started with Test Driven Development - Ferdous Mahmud Shaon
Getting started with Test Driven Development - Ferdous Mahmud Shaon
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
 
An Overview of automated testing (1)
An Overview of automated testing (1)An Overview of automated testing (1)
An Overview of automated testing (1)
 
Getting started with Test Driven Development
Getting started with Test Driven DevelopmentGetting started with Test Driven Development
Getting started with Test Driven Development
 
Unit testing
Unit testingUnit testing
Unit testing
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdf
 
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
Testing As A Bottleneck - How Testing Slows Down Modern Development Processes...
 

Dernier

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Dernier (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Strategic Testing (CodeMash 2016)

  • 2. WHAT IS A TEST STRATEGY?
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. SYMPTOMS OF POOR TEST STRATEGY
  • 9. IT’S NOT NECESSARILY LOW QUALITY. IT’S THE COST OF HIGH QUALITY.
  • 10. TEST SMARTER, NOT HARDER.
  • 11. test the right things at the right time with the right tools
  • 12. TESTING TOOLBOX — TYPES OF TESTS •unit (small) •integration (medium) •end-to-end (large automated) •end-to-end (large manual) •unscripted/sapient •nonfunctional ("-ility") tests
  • 13. Test Type Sample Technologies UNIT JUnit, RSpec, NUnit, Spock, Mockito, Jasmine, Mocha INTEGRATION same as above; custom MANUAL E2E HP Quality Center, Gherkin, unstructured AUTOMATED E2E HP Unified Functional Testing, Cucumber, custom UNSCRIPTED unstructured "ILITY" TESTS Gatling, sqlmap, Selenium Grid, WAVE TESTING TOOLBOX — TECHNOLOGIES
  • 14. WE HAVE THE TOOLS. HOW DO WE USE THEM? GOOD TEST STRATEGY
  • 15. • Minimizes waste. • Puts burden of testing primarily on devs. • Sustainable. • Repeatable. • Yields tests that maximize speed of feedback, reliability, and focus. PROPERTIES OF A GOOD TEST STRATEGY
  • 16. • Favor tighter feedback loops. • Think in terms of unknowns. • Automate, automate, automate. • Avoid redundancy. • Don't be redundant. • Address nonfunctional requirements early. PRINCIPLES OF TEST STRATEGY (VERSION 0.3.4)
  • 17. Principle 1 Favor tighter feedback loops.
  • 18. Principle 1 Favor tighter feedback loops. CostandRuntime Test Type lower order higher order
  • 19. Principle 1 Favor tighter feedback loops. Testing whether a seat belt locking mechanism works…
  • 20. Principle 2 Think in terms of unknowns. • unit tests? • service-level integration tests? • basic end-to-end automated tests? • testing Safari on iOS? • testing against production data? What questions do you answer with…
  • 21. Principle 2 Think in terms of unknowns. • acceptance criteria — are they met? • architecture — is integration exercised? • environments — how is app affected? • non-functional reqs — are they met? • ??? (unknown unknowns) What raises questions? (What are sources of unknowns?)
  • 22. Principle 3 Automate, automate, automate. Except for… • Look and feel tests (maybe) • Graphical consistency tests • Wildly complex integrations • Tests with risky side effects • Stuff too hard to automate
  • 23. Principle 3 Automate, automate, automate. NO AUTOMATION FOR U
  • 24. Principle 4 Avoid redundancy. Across Test Levels Across Platforms Across Environments Within Test Level
  • 25. Principle 4 Avoid redundancy. Track integration points. ServiceController Data Store ? ?
  • 28. •Coverage of all acceptance criteria. •Sufficient coverage of non-functional requirements. •Fast combined run of tests. (Fast feedback loops.) •Inexpensive (to write and maintain) test suite. GOALS
  • 30. Search by Last Name and (optionally) First Name. Search is a case-insensitive "wildcard" search (uses terms as substrings). Search is unavailable when offline. Search button is disabled unless these search criteria are met: • If searching by Last Name only, at least 3 characters required. • If searching by both, at least 1 character required for each. Search ignores non-alpha characters ([^A-Za-z]). This includes punctuation, numbers, and all "special" chars (á, ä, ñ etc.) If a server-side error occurs, display sad emoji and error message. … USER SEARCH — ACCEPTANCE CRITERIA
  • 31. Search by Last Name and (optionally) First Name. Search is a case-insensitive "wildcard" search (uses terms as substrings). Search is unavailable when offline. … USER SEARCH — STORY 1 Start with a conversation about unknowns.
  • 32. STORY 1 — QUESTIONS TO ANSWER • Is the user able to enter search terms and press the search button? • If results come back from the server, do they appear correctly? • Do results return from the server successfully? • Where do the results appear in the UI? • Does the search service hit the data store correctly? • Does the app search through the data correctly… • …based on Last Name? • …based on Last Name + First Name? • Does the app return search results quickly enough?
  • 33. HOW DO WE ANSWER THESE?
  • 34. HOW DO WE ANSWER THESE? Unit Tests • Is the user able to enter search terms and press the search button? • If results come back from the server, do they appear correctly? • Do results return from the server successfully? • Where do the results appear in the UI? • Does the search service hit the data store correctly? • Does the app search through the data correctly… • …based on Last Name? • ….based on Last Name + First Name? • Does the app return search results quickly enough? Integration Tests E2E Tests Performance Test What can you isolate?
  • 35. SOME ANSWERS RAISE FURTHER QUESTIONS • Does the app return search results quickly enough? Performance Test NOPE ok then…
  • 36. SOME ANSWERS RAISE FURTHER QUESTIONS • Does the search service leverage the cache properly? New Integration Test Service Data Store Cache
  • 37. USER SEARCH — NEXT STORY! Search by Last Name and (optionally) First Name. Search is a case-insensitive "wildcard" search (uses terms as substrings). Search is unavailable when offline. … Oh! Oh! I know how to test it!
  • 38. Scenario Outline: user search Given I go to the user search page When I search for users by <first_name> and <last_name> Then I get back correct search results Examples: | first_name | last_name | | Han | Solo | | *k* | Skywalker | NO!
  • 39. Search is a case-insensitive "wildcard" search (uses terms as substrings). What unknowns does this acceptance criterion raise?
  • 40. Consider components and integration points. Search Service Controller Data Store Cache Web Things Web Voodoo WHAT DO WE KNOW? Does wildcard search introduce new ones? (Avoid redundancy.)
  • 41. STORY 2 — QUESTIONS TO ANSWER • Does the search service handle wildcards correctly… • …in the Last Name? • …in the First Name? • Does it pass the wildcard to the data layer properly? Unit Tests Integration Tests Favor tight feedback loops!
  • 42. USER SEARCH — THIRD STORY! Search by Last Name and (optionally) First Name. Search is a case-insensitive "wildcard" search (uses terms as substrings). Search is unavailable when offline. … Does the UI respond correctly if the server becomes unavailable? Does the UI respond correctly if the server becomes available?
  • 43. YOU DON'T NEED TO USE E2E TESTS HERE. Simplify. Mock server responses. Inspect UI elements.
  • 44. SOME RULES OF THUMB (TACTICS) • Logic you can isolate — unit tests • Validation • Display logic • Service logic • Boundary conditions • Medium-sized collaboration — integration tests • Logic you cannot isolate — e2e tests What are you testing?
  • 45. WHAT YOU SHOULD END UP WITH… • Acceptance criteria covered. • Unknowns minimized. • A large unit test suite. • A medium-sized integration test suite. • A lean end-to-end test suite. • Focused tests without redundancies.
  • 48. COMMON OBSTACLES Lack of common understanding.
  • 50. COMMON OBSTACLES Lack of appropriate tools.
  • 51. BACK AT WORK… • Make a testing "pyramid" of current state. • Put testers and implementers together • Look for redundancy across test suites • Move tests to as low a level as possible • Look for signs that tests are missing • Encourage knowledge transfer • Start improving and never stop