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

More Related Content

What's hot

5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing5 Considerations When Adopting Automated Testing
5 Considerations When Adopting Automated Testing
Bhupesh 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 99designs
lachlandonald
 
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
QA or the Highway
 
SQL Server Worst Practices - EN
SQL Server Worst Practices - ENSQL Server Worst Practices - EN
SQL Server Worst Practices - EN
Gianluca 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 Shannahan
QA 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 Tests
Marcus 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 Lancaster
QA 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 platform
Chamil 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 Dive
Anand 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 2016
Steinn '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 case
Srilu Balla
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021
Anand Bagmar
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
Tyler 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 Framework
Anand Bagmar
 
Patterns in Test Automation
Patterns in Test AutomationPatterns in Test Automation
Patterns in Test Automation
Anand 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 Django
Psalms Kalu
 
Accessibility: Navigation, Forms, & Multimedia
Accessibility: Navigation, Forms, & MultimediaAccessibility: Navigation, Forms, & Multimedia
Accessibility: Navigation, Forms, & Multimedia
Klara 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 2016
Steven Smith
 

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

Viewers also liked

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
QAAgility 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 Things
Salesforce Developers
 
Manage Your Agile Development from Salesforce
Manage Your Agile Development from SalesforceManage Your Agile Development from Salesforce
Manage Your Agile Development from Salesforce
Salesforce 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 Know
SoftServe
 
Complex End-to-End Testing
Complex End-to-End TestingComplex End-to-End Testing
Complex End-to-End Testing
Erika 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.0
COP_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 applications
Mihai-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 Testing
Josiah Renaudin
 
Test Planning_Arsala
Test Planning_ArsalaTest Planning_Arsala
Test Planning_Arsala
Arsala Dilshad
 
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 @ TPC
David Porter
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
Walmyr Lima e Silva Filho
 
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
Cognizant
 
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
The Software House
 
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
University of Computer Science and Technology
 
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
Thoughtworks
 
Configuration Management
Configuration ManagementConfiguration Management
Configuration Management
Rajesh Kumar
 

Viewers also liked (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
 

Similar to Strategic Testing (CodeMash 2016)

Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too much
Shawn Wallace
 
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
QA or the Highway
 
Why Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsWhy Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOps
dpaulmerrill
 
c
cc
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
Sahar 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 Shannahan
QA or the Highway
 
Random testing
Random testingRandom testing
Random testing
Can KAYA
 
Dare to Explore: Discover ET!
Dare to Explore: Discover ET!Dare to Explore: Discover ET!
Dare to Explore: Discover ET!
Raj Indugula
 
CPP09 - Testing
CPP09 - TestingCPP09 - Testing
CPP09 - Testing
Michael Heron
 
Black box testing
Black box testingBlack box testing
Black box testing
Nakul Sharma
 
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
Ritesh 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 StackOverflow
Adam 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 Shaon
Cefalo
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
Pablo 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 Development
Ferdous Mahmud Shaon
 
Unit testing
Unit testingUnit testing
Unit testing
PiXeL16
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdf
AmirMohamedNabilSale
 
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
 

Similar to Strategic Testing (CodeMash 2016) (20)

Stop! you're testing too much
Stop!  you're testing too muchStop!  you're testing too much
Stop! you're testing too much
 
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
 
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...
 

Recently uploaded

E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
AnkitaPandya11
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 

Recently uploaded (20)

E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 

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