SlideShare a Scribd company logo
1 of 43
Download to read offline
ParasoftCopyright© 2015 1
2015-05-01
Are Your Continuous Tests
Too Fragile for Agile
Arthur Hicken
Parasoft Evangelist
ParasoftCopyright© 2015 22
Arthur Hicken Bio
Arthur “Code Curmudgeon” Hicken is heavily involved in the
development and testing communities. He is passionate about
businesses realizing the full potential of testing solutions. As an
expert in his field, Arthur is a sought after speaker regarding
testing strategies, efficiencies and results.
He has been at Parasoft for over 20 years driving the strategic
conversation around SDLC practices that
enhance productivity and quality. In
addition to holding the title of Evangelist,
Arthur represents Parasoft on multiple
industry organizations including ICSQ,
OWASP, NIST/SAMATE, CWE and more.
ParasoftCopyright© 2015 33
Agenda
 Challenges of Continuous Agile
 Testing defined
 Testing is hard (no one wants to do it)
 Best practices
 A modest proposal: Spring cleaning
ParasoftCopyright© 2015 44
The role of QA in Agile
 QA is part of development, not an
afterthought
 Review developer testing efforts
 Additional testing of requirements
 Iterative during development
 Fast discovery and reporting of defects
 Investigate root cause of defects
 Influence development policy
ParasoftCopyright© 2015 55
Challenges of Agile
 Need to be fast
 Need to be flexible
 Testing can be overlooked if not baked in
 Architectural compromises from schedule
ParasoftCopyright© 2015 66
Challenges of Continuous
 Tests must produce binary decision go/no-go
 Reuse unit test and functional tests from dev
to QA
 High level of automation
 Requires disciplined mature process
 Testing must automatically answer
 Is it stable
 Will it do what it’s supposed to do
ParasoftCopyright© 2015 77
Importance of Testing
How do you know when you're done?
How do you know if a fix for a minor bug broke a major
function of the system?
How can the system evolve into something more than is
currently envisioned?
Testing,both unit and functional,needs to be an
integratedpart of the developmentprocess.
ParasoftCopyright© 2015 88
Testing delivers
A maintained suite of unit tests:
 Represents the most practical design possible
 Provides the best form of documentation for
classes
 Determines when a class is "done"
 Gives a developer confidence in the code
 Is a basis for refactoring quickly
ParasoftCopyright© 2015 99
Why Testing is Often Ignored
• Too much effort
• Too much time
• We’re on a schedule – no time to test.
• Why is there always time to do it over, but never to do it right?
Perceived as “burdensome”
• “I don’t need to test my code – I don’t make mistakes.”
• Testing means I have to admit that I might have made a mistake.
• I don’t like to test – it’s beneath me.
• Testing isn’t fun – I just want to code!
• That’s for the QA dept.
Developer Ego
ParasoftCopyright© 2015 1010
Definitions
 Unit
 Functional
 Regression
ParasoftCopyright© 2015 1111
Unit Testing
Unit tests that validates your method behaves a
certain way given a specific parameters
 Regressions testing
 Validate behavior of existing code hasn’t changed
 Scheduled and run automatically
 Test Driven Development
 Validate behavior of new code to be written
 Created before developing, turned into regression tests
after
ParasoftCopyright© 2015 1212
Functional Testing
• Unit tests (Junit, CppUnit, Nunit, etc)
• Integration tests
• Scripted tests
• Manual tests
Incarnations of functional tests
• Manually written
• Machine generated from application tracing
• Machine generated from capturing traffic
• Machine generated from recording clicks
Ways to createfunctional tests
ParasoftCopyright© 2015 1313
Regression Testing
• Functional unit tests that pass
• Machine generated unit tests for current behavior
• Unit test written by developers and testers
• Tests written to validate bug fixes
Contributors to the regression test suite
• Unwanted change in behavior – fix the code
• Intentional change in specification – update test
controls
Regression test failures
ParasoftCopyright© 2015 1414
What’s the Difference?
Unit Tests
• The code is doing things right
• Written fromprogrammers perspective
• Confirm code gives proper output based on specific input
Functional Tests
• The code is doing the right thing
• Written fromusers perspective
• Confirm the system does what the user expects it to do
Regression Tests
• It still works
ParasoftCopyright© 2015 1515
Why Do Unit Testing
Software bugs are inserted during coding phase, but
often aren’t found until functional testing, or worse
they are found by customers. The longer a bug stays
in the system, the more expensive it is to fix it.
Unit testing is a strategy that allows you to find out if
your system is behaving the way you expect early in
the SDLC.
Unit testing allows for easy regression testing, so you
can find out quickly whether you have introduced
some unexpected behavior into the system.
ParasoftCopyright© 2015 1616
The Cost of Defects
ParasoftCopyright© 2015 1717
Best Practices
ParasoftCopyright© 2015 1818
What’s Important
Unit tests require a LOT of care
Unit testing is a continuous operation
Test suite maintenance is a commitment
Control data (assertions) in the code
ParasoftCopyright© 2015 1919
Test incorporation
 Take existing unit tests and schedule them into
build process
 Run and fix tests as part of build process
 Ideal goal: 0 failures and 100% code coverage
 Realistic goal: 10% test failures and 80% code
coverage
 If the unit test suite is noisy, don’t qualify the
build based on assertion failures
ParasoftCopyright© 2015 2020
Unit Test Creation
 Maintainability
 Proper assertions
 Nightly runs
 Tests should be:
 Automatic (no human input or review)
 Repeatable (no strange dependencies)
ParasoftCopyright© 2015 2121
Legacy Test Suites
 Leverage your existing suite
 Clean up incrementally
 Set policy based on current results
 Tighten policy when in compliance
ParasoftCopyright© 2015 2222
Maintaining and Creating UT
 Maintaining is more of a problem than
creating.
 Don’t create a test if you can’t or don’t plan to
maintain it.
 Creating as you go creates a better test suite
 Tests not run regularly become irrelevant
ParasoftCopyright© 2015 2323
Write tests with the code
Create the test when you’re writing the code
Have a test for every task you complete
Increases understanding
Improve assertions
ParasoftCopyright© 2015 2424
Connect Unit Tests
 Associate tests with Code and Requirements
 Naming Conventions should have meaning
 Use code comment tags @task @pr @fr
 Use check-in comments @task @pr @fr
 Improve change-based testing
ParasoftCopyright© 2015 2525
Specific Generation
 Don’t be lured by 100% coverage
 Auto assertions are not meaningful unless
validated
 Review the tests as you work on the code
ParasoftCopyright© 2015 2626
Code Review Test
 Code for unit tests should be reviewed
 Consider doing test-design review
 Ensures you’re testing what you think you are
 Helps reduce noise
 Helps improve understanding
 Review the code and the test code together
ParasoftCopyright© 2015 2727
Testing Exception Handling
 Frequently Skipped
 Prevents crashes
 Prevents death spiral
 Rule of thirds
 1/3 basic functionality
 1/3 advanced features / infrequent settings
 1/3 error handling
ParasoftCopyright© 2015 2828
All About Assertions
 Verifies that the code behaves as intended
 True/false
 Null or not null
 Specific values
 Complex conditions
ParasoftCopyright© 2015 2929
Why Assert?
 Excuses:
 My code already has
console output
 I can check it
visually/manually
 Binary output (pass/fail)
 Part of overall test suite
 No human intervention
ParasoftCopyright© 2015 3030
Assertion failures
Introduced coding error
• Fix the new code
Functionality changed
• Update the assertion
Improper assertion
• Comment it out
ParasoftCopyright© 2015 3131
Assertion Policy
 Assign failures as tasks
 Author of the test or of the changed code
 Try to reach developer that has the highest chance
to understand the change
 Developer assesses failure:
 Bug (fix)
 Changed functionality (update assertion)
 Bad assertion (improve or remove) - don’t delete;
instead, comment out
ParasoftCopyright© 2015 3232
What to assert
 Ease of creating assertions leads to poor
choices
 Anything CAN be checked – but should it be?
 Assertions should be connected to what
you’re trying to test
 Assertions should be logically invariant
 Check values by range, not equivalence
 “What do I expect here logically?”
ParasoftCopyright© 2015 3333
How to recognize bad assertions
 How often do you WANT to manually verify an
assertion?
 Daily or near-daily checking indicates poor
assertion.
 Troublesome possibilities:
 Date
 User or machine name
 OS
 Filesystem names and paths
ParasoftCopyright© 2015 3434
Missing Assertions
 Error was found after code changed
 Test suite never caught the error
 Update unit-test with new assertion
 Write new unit tests as necessary
ParasoftCopyright© 2015 3535
Cleaning It Up
ParasoftCopyright© 2015 3636
The Challenge: Management’s Perspective
 Need tests to reduce risks
 Testing takes time from
features/fixes
 Not enough time
 Not enough people
 Tests and reports lack context
ParasoftCopyright© 2015 3737
The Challenge: Development’s Perspective
 Hundreds of failing or
broken tests
 Test requirements unclear
 Existing tests are dubious
 Deadline pressure
ParasoftCopyright© 2015 3838
Spring Cleaning Solution
 Throw out the useless, old junk
 Identify and eliminate “noisy” tests
 Organize the remaining chores
 Prioritize unit test tasks
 Keep it clean
 Establish and follow a routine test maintenance plan
ParasoftCopyright© 2015 3939
Throw out the Junk: Identifying Noisy Tests
Tests that are fragile
• Pass/Fail/Incomplete resultsfrequentlychange
• Frequentchangesare requiredto keep up-to-date
Tests that are outdated
• More than“n” releaseshaveoccurred despitethistest failure
• The test appliesto legacy codethat is frozen
• The test hasnot been executedfor “x” periodof time
Tests that are unclear
• It takes more than5 minutesto understand why thetest exists
• The failuremessage is incorrect/unhelpful/irrelevant
• There is no associated requirementordefect
Be merciless!
ParasoftCopyright© 2015 4040
Organize Chores: Prioritize Tasks with Policy
All tasks are created equal
Some tasks are more equal than others
Policies establish prioritization and assignment
ParasoftCopyright© 2015 4141
Keep it Clean: Establish a Routine Process
 Management and Development need to co-define a Policy
 Clear testing goals that tie tests to business needs
 Clear delineation of responsibility
 Test creation and deletion
 Test failureresolution
 Naming conventions
 Peer review
 Clear and frequentcommunication
 Understand the technical and business impact
 Enhance traceability to project requirements
 Ask questions
 Focus on safety/quality, not coverage
 Keep the number of tests minimal
 Run all tests on a regularly scheduled, frequent basis
 Clean as you go
ParasoftCopyright© 2015 4242
Spring Cleaning Recap
 Find and delete “noisy” tests
 Use policies to prioritize, assign, and plan
 Co-design and follow a process to keep it clean
ParasoftCopyright© 2015 4343
 Web
 http://www.parasoft.com/jsp/resources
 Blog
 http://alm.parasoft.com
Social
 Facebook: https://www.facebook.com/parasoftcorporation
 Twitter: @Parasoft@MustRead4Dev @CodeCurmudgeon
 LinkedIn: http://www.linkedin.com/company/parasoft
 Google+: +Parasoft +ArthurHickenCodeCurmudgeon
 Google+ Community: Development Testing Because its Better

More Related Content

What's hot

Agile Test Automation
Agile Test AutomationAgile Test Automation
Agile Test AutomationWerner Keil
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test AutomationSauce Labs
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QARapidValue
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestCory Foy
 
Vladimir Primakov - Qa management in big agile teams
Vladimir Primakov - Qa management in big agile teamsVladimir Primakov - Qa management in big agile teams
Vladimir Primakov - Qa management in big agile teamsIevgenii Katsan
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
SpiraTest: Designing and Creating Test Script
SpiraTest: Designing and Creating Test ScriptSpiraTest: Designing and Creating Test Script
SpiraTest: Designing and Creating Test ScriptInflectra
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationTechWell
 
Continuous integration testing fundamentals
Continuous integration testing fundamentalsContinuous integration testing fundamentals
Continuous integration testing fundamentalsCygnet Infotech
 
QA Process Overview for Firefox OS 2014
QA Process Overview for Firefox OS 2014QA Process Overview for Firefox OS 2014
QA Process Overview for Firefox OS 2014Anthony Chung
 
Fundamentals of testing 1
Fundamentals of testing 1Fundamentals of testing 1
Fundamentals of testing 1Hoang Nguyen
 
Why Automation Fails—in Theory and Practice
Why Automation Fails—in Theory and PracticeWhy Automation Fails—in Theory and Practice
Why Automation Fails—in Theory and PracticeTechWell
 
Large-Scale Agile Test Automation Strategies in Practice
Large-Scale Agile Test Automation Strategies in PracticeLarge-Scale Agile Test Automation Strategies in Practice
Large-Scale Agile Test Automation Strategies in PracticeTechWell
 
Inverting Test Pyramid - A First Hand Experience Report
Inverting Test Pyramid - A First Hand Experience ReportInverting Test Pyramid - A First Hand Experience Report
Inverting Test Pyramid - A First Hand Experience ReportNaresh Jain
 
Test strategicaly
Test strategicalyTest strategicaly
Test strategicalyErik Lebel
 
Applying Agile Principles to Test Automation Development
Applying Agile Principles to Test Automation DevelopmentApplying Agile Principles to Test Automation Development
Applying Agile Principles to Test Automation DevelopmentTechWell
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessLee Barnes
 

What's hot (20)

Agile Test Automation
Agile Test AutomationAgile Test Automation
Agile Test Automation
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Vladimir Primakov - Qa management in big agile teams
Vladimir Primakov - Qa management in big agile teamsVladimir Primakov - Qa management in big agile teams
Vladimir Primakov - Qa management in big agile teams
 
QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)QA metrics in Agile (GUIDE)
QA metrics in Agile (GUIDE)
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
SpiraTest: Designing and Creating Test Script
SpiraTest: Designing and Creating Test ScriptSpiraTest: Designing and Creating Test Script
SpiraTest: Designing and Creating Test Script
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous Integration
 
Testing Best Practices
Testing Best PracticesTesting Best Practices
Testing Best Practices
 
Continuous integration testing fundamentals
Continuous integration testing fundamentalsContinuous integration testing fundamentals
Continuous integration testing fundamentals
 
QA Process Overview for Firefox OS 2014
QA Process Overview for Firefox OS 2014QA Process Overview for Firefox OS 2014
QA Process Overview for Firefox OS 2014
 
Fundamentals of testing 1
Fundamentals of testing 1Fundamentals of testing 1
Fundamentals of testing 1
 
Why Automation Fails—in Theory and Practice
Why Automation Fails—in Theory and PracticeWhy Automation Fails—in Theory and Practice
Why Automation Fails—in Theory and Practice
 
Large-Scale Agile Test Automation Strategies in Practice
Large-Scale Agile Test Automation Strategies in PracticeLarge-Scale Agile Test Automation Strategies in Practice
Large-Scale Agile Test Automation Strategies in Practice
 
Inverting Test Pyramid - A First Hand Experience Report
Inverting Test Pyramid - A First Hand Experience ReportInverting Test Pyramid - A First Hand Experience Report
Inverting Test Pyramid - A First Hand Experience Report
 
Test strategicaly
Test strategicalyTest strategicaly
Test strategicaly
 
Applying Agile Principles to Test Automation Development
Applying Agile Principles to Test Automation DevelopmentApplying Agile Principles to Test Automation Development
Applying Agile Principles to Test Automation Development
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
 
The Test Pyramid
The Test PyramidThe Test Pyramid
The Test Pyramid
 

Similar to Are Your Continuous Tests Too Fragile for Agile?

How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycleDiUS
 
Better Software East 2016: Evolving Automated to Continuous
Better Software East 2016: Evolving Automated to ContinuousBetter Software East 2016: Evolving Automated to Continuous
Better Software East 2016: Evolving Automated to ContinuousParasoft
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingCameron Presley
 
softwaretestingppt-120810095500-phpapp02 (1).pdf
softwaretestingppt-120810095500-phpapp02 (1).pdfsoftwaretestingppt-120810095500-phpapp02 (1).pdf
softwaretestingppt-120810095500-phpapp02 (1).pdfBabaShaikh3
 
The DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightThe DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightInflectra
 
OS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptx
OS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptxOS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptx
OS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptxShivareddyGangam
 
I ntroduction to software testing part1
I ntroduction to software testing part1I ntroduction to software testing part1
I ntroduction to software testing part1Prachi Sasankar
 
Software Testing PPT | Software All Testing
Software Testing PPT | Software All TestingSoftware Testing PPT | Software All Testing
Software Testing PPT | Software All Testingsankalpkumarsahoo174
 
A Complete Guide to Functional Testing
A Complete Guide to Functional TestingA Complete Guide to Functional Testing
A Complete Guide to Functional TestingMatthew Allen
 
A Complete Guide to Functional Testing
A Complete Guide to Functional TestingA Complete Guide to Functional Testing
A Complete Guide to Functional TestingAbhay Kumar
 
Zero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOpsZero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOpsTaUB Solutions
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQTomas Riha
 
Use Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual TestingUse Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual TestingTechWell
 
SoftwareTesting_Interview_Ques.pptx
SoftwareTesting_Interview_Ques.pptxSoftwareTesting_Interview_Ques.pptx
SoftwareTesting_Interview_Ques.pptxmahadev46
 
Testing 3: Types Of Tests That May Be Required
Testing 3: Types Of Tests That May Be RequiredTesting 3: Types Of Tests That May Be Required
Testing 3: Types Of Tests That May Be RequiredArleneAndrews2
 

Similar to Are Your Continuous Tests Too Fragile for Agile? (20)

How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
 
Better Software East 2016: Evolving Automated to Continuous
Better Software East 2016: Evolving Automated to ContinuousBetter Software East 2016: Evolving Automated to Continuous
Better Software East 2016: Evolving Automated to Continuous
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
Future of QA
Future of QAFuture of QA
Future of QA
 
Futureofqa
FutureofqaFutureofqa
Futureofqa
 
softwaretestingppt-120810095500-phpapp02 (1).pdf
softwaretestingppt-120810095500-phpapp02 (1).pdfsoftwaretestingppt-120810095500-phpapp02 (1).pdf
softwaretestingppt-120810095500-phpapp02 (1).pdf
 
The DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightThe DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It Right
 
OS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptx
OS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptxOS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptx
OS-Final-Transform-Manual-Testing-Processes-to-incorporate-Automatio....pptx
 
I ntroduction to software testing part1
I ntroduction to software testing part1I ntroduction to software testing part1
I ntroduction to software testing part1
 
Software Testing - SDLC Model
Software Testing - SDLC ModelSoftware Testing - SDLC Model
Software Testing - SDLC Model
 
Agile testing
Agile testingAgile testing
Agile testing
 
Software Testing PPT | Software All Testing
Software Testing PPT | Software All TestingSoftware Testing PPT | Software All Testing
Software Testing PPT | Software All Testing
 
A Complete Guide to Functional Testing
A Complete Guide to Functional TestingA Complete Guide to Functional Testing
A Complete Guide to Functional Testing
 
A Complete Guide to Functional Testing
A Complete Guide to Functional TestingA Complete Guide to Functional Testing
A Complete Guide to Functional Testing
 
Zero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOpsZero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOps
 
testing.pptx
testing.pptxtesting.pptx
testing.pptx
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQ
 
Use Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual TestingUse Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual Testing
 
SoftwareTesting_Interview_Ques.pptx
SoftwareTesting_Interview_Ques.pptxSoftwareTesting_Interview_Ques.pptx
SoftwareTesting_Interview_Ques.pptx
 
Testing 3: Types Of Tests That May Be Required
Testing 3: Types Of Tests That May Be RequiredTesting 3: Types Of Tests That May Be Required
Testing 3: Types Of Tests That May Be Required
 

More from Parasoft

Testing a Microservices Architecture
Testing a Microservices ArchitectureTesting a Microservices Architecture
Testing a Microservices ArchitectureParasoft
 
ABC's of Service Virtualization
ABC's of Service VirtualizationABC's of Service Virtualization
ABC's of Service VirtualizationParasoft
 
The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...
The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...
The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...Parasoft
 
AppsSec In a DevOps World
AppsSec In a DevOps WorldAppsSec In a DevOps World
AppsSec In a DevOps WorldParasoft
 
Driving Risks Out of Embedded Automotive Software
Driving Risks Out of Embedded Automotive SoftwareDriving Risks Out of Embedded Automotive Software
Driving Risks Out of Embedded Automotive SoftwareParasoft
 
Rx for FDA Software Compliance
Rx for FDA Software ComplianceRx for FDA Software Compliance
Rx for FDA Software ComplianceParasoft
 
Software Safety and Security Through Standards
Software Safety and Security Through Standards Software Safety and Security Through Standards
Software Safety and Security Through Standards Parasoft
 
No Devops Without Continuous Testing
No Devops Without Continuous TestingNo Devops Without Continuous Testing
No Devops Without Continuous TestingParasoft
 
Accelerate Agile Development with Service Virtualization - Czech Test
Accelerate Agile Development with Service Virtualization - Czech TestAccelerate Agile Development with Service Virtualization - Czech Test
Accelerate Agile Development with Service Virtualization - Czech TestParasoft
 
Evolving from Automated to Continous Testing for Agile and DevOps
Evolving from Automated to Continous Testing for Agile and DevOpsEvolving from Automated to Continous Testing for Agile and DevOps
Evolving from Automated to Continous Testing for Agile and DevOpsParasoft
 
Deploy + Destroy Complete Test Environments
Deploy + Destroy Complete Test EnvironmentsDeploy + Destroy Complete Test Environments
Deploy + Destroy Complete Test EnvironmentsParasoft
 
MedicAlert API Testing Case Study
MedicAlert API Testing Case StudyMedicAlert API Testing Case Study
MedicAlert API Testing Case StudyParasoft
 
End-to-end Testing for IoT Integrity
End-to-end Testing for IoT IntegrityEnd-to-end Testing for IoT Integrity
End-to-end Testing for IoT IntegrityParasoft
 
Leveraging Static Analysis to Secure Software
Leveraging Static Analysis to Secure SoftwareLeveraging Static Analysis to Secure Software
Leveraging Static Analysis to Secure SoftwareParasoft
 
BUSTED! How to Find Security Bugs Fast!
BUSTED! How to Find Security Bugs Fast!BUSTED! How to Find Security Bugs Fast!
BUSTED! How to Find Security Bugs Fast!Parasoft
 
Software Development Metrics You Can Count On
Software Development Metrics You Can Count On Software Development Metrics You Can Count On
Software Development Metrics You Can Count On Parasoft
 
Accelerating Mobile Testing
Accelerating Mobile TestingAccelerating Mobile Testing
Accelerating Mobile TestingParasoft
 
C/C++test Qualification Kit for DO-178B/C Compliance
C/C++test Qualification Kit for DO-178B/C ComplianceC/C++test Qualification Kit for DO-178B/C Compliance
C/C++test Qualification Kit for DO-178B/C ComplianceParasoft
 
Extreme Automation Enables DirecTV to ”Shift Left” API Testing
Extreme Automation Enables DirecTV to ”Shift Left” API TestingExtreme Automation Enables DirecTV to ”Shift Left” API Testing
Extreme Automation Enables DirecTV to ”Shift Left” API TestingParasoft
 
A Comparison of Three Bug-Finding Techniques and Their Relative Effectiveness
A Comparison of Three Bug-Finding Techniques and Their Relative EffectivenessA Comparison of Three Bug-Finding Techniques and Their Relative Effectiveness
A Comparison of Three Bug-Finding Techniques and Their Relative EffectivenessParasoft
 

More from Parasoft (20)

Testing a Microservices Architecture
Testing a Microservices ArchitectureTesting a Microservices Architecture
Testing a Microservices Architecture
 
ABC's of Service Virtualization
ABC's of Service VirtualizationABC's of Service Virtualization
ABC's of Service Virtualization
 
The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...
The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...
The Legend of Software Hollow: Defeating the Headless Horseman of Faulty Appl...
 
AppsSec In a DevOps World
AppsSec In a DevOps WorldAppsSec In a DevOps World
AppsSec In a DevOps World
 
Driving Risks Out of Embedded Automotive Software
Driving Risks Out of Embedded Automotive SoftwareDriving Risks Out of Embedded Automotive Software
Driving Risks Out of Embedded Automotive Software
 
Rx for FDA Software Compliance
Rx for FDA Software ComplianceRx for FDA Software Compliance
Rx for FDA Software Compliance
 
Software Safety and Security Through Standards
Software Safety and Security Through Standards Software Safety and Security Through Standards
Software Safety and Security Through Standards
 
No Devops Without Continuous Testing
No Devops Without Continuous TestingNo Devops Without Continuous Testing
No Devops Without Continuous Testing
 
Accelerate Agile Development with Service Virtualization - Czech Test
Accelerate Agile Development with Service Virtualization - Czech TestAccelerate Agile Development with Service Virtualization - Czech Test
Accelerate Agile Development with Service Virtualization - Czech Test
 
Evolving from Automated to Continous Testing for Agile and DevOps
Evolving from Automated to Continous Testing for Agile and DevOpsEvolving from Automated to Continous Testing for Agile and DevOps
Evolving from Automated to Continous Testing for Agile and DevOps
 
Deploy + Destroy Complete Test Environments
Deploy + Destroy Complete Test EnvironmentsDeploy + Destroy Complete Test Environments
Deploy + Destroy Complete Test Environments
 
MedicAlert API Testing Case Study
MedicAlert API Testing Case StudyMedicAlert API Testing Case Study
MedicAlert API Testing Case Study
 
End-to-end Testing for IoT Integrity
End-to-end Testing for IoT IntegrityEnd-to-end Testing for IoT Integrity
End-to-end Testing for IoT Integrity
 
Leveraging Static Analysis to Secure Software
Leveraging Static Analysis to Secure SoftwareLeveraging Static Analysis to Secure Software
Leveraging Static Analysis to Secure Software
 
BUSTED! How to Find Security Bugs Fast!
BUSTED! How to Find Security Bugs Fast!BUSTED! How to Find Security Bugs Fast!
BUSTED! How to Find Security Bugs Fast!
 
Software Development Metrics You Can Count On
Software Development Metrics You Can Count On Software Development Metrics You Can Count On
Software Development Metrics You Can Count On
 
Accelerating Mobile Testing
Accelerating Mobile TestingAccelerating Mobile Testing
Accelerating Mobile Testing
 
C/C++test Qualification Kit for DO-178B/C Compliance
C/C++test Qualification Kit for DO-178B/C ComplianceC/C++test Qualification Kit for DO-178B/C Compliance
C/C++test Qualification Kit for DO-178B/C Compliance
 
Extreme Automation Enables DirecTV to ”Shift Left” API Testing
Extreme Automation Enables DirecTV to ”Shift Left” API TestingExtreme Automation Enables DirecTV to ”Shift Left” API Testing
Extreme Automation Enables DirecTV to ”Shift Left” API Testing
 
A Comparison of Three Bug-Finding Techniques and Their Relative Effectiveness
A Comparison of Three Bug-Finding Techniques and Their Relative EffectivenessA Comparison of Three Bug-Finding Techniques and Their Relative Effectiveness
A Comparison of Three Bug-Finding Techniques and Their Relative Effectiveness
 

Recently uploaded

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
+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
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 

Recently uploaded (20)

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
+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...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

Are Your Continuous Tests Too Fragile for Agile?

  • 1. ParasoftCopyright© 2015 1 2015-05-01 Are Your Continuous Tests Too Fragile for Agile Arthur Hicken Parasoft Evangelist
  • 2. ParasoftCopyright© 2015 22 Arthur Hicken Bio Arthur “Code Curmudgeon” Hicken is heavily involved in the development and testing communities. He is passionate about businesses realizing the full potential of testing solutions. As an expert in his field, Arthur is a sought after speaker regarding testing strategies, efficiencies and results. He has been at Parasoft for over 20 years driving the strategic conversation around SDLC practices that enhance productivity and quality. In addition to holding the title of Evangelist, Arthur represents Parasoft on multiple industry organizations including ICSQ, OWASP, NIST/SAMATE, CWE and more.
  • 3. ParasoftCopyright© 2015 33 Agenda  Challenges of Continuous Agile  Testing defined  Testing is hard (no one wants to do it)  Best practices  A modest proposal: Spring cleaning
  • 4. ParasoftCopyright© 2015 44 The role of QA in Agile  QA is part of development, not an afterthought  Review developer testing efforts  Additional testing of requirements  Iterative during development  Fast discovery and reporting of defects  Investigate root cause of defects  Influence development policy
  • 5. ParasoftCopyright© 2015 55 Challenges of Agile  Need to be fast  Need to be flexible  Testing can be overlooked if not baked in  Architectural compromises from schedule
  • 6. ParasoftCopyright© 2015 66 Challenges of Continuous  Tests must produce binary decision go/no-go  Reuse unit test and functional tests from dev to QA  High level of automation  Requires disciplined mature process  Testing must automatically answer  Is it stable  Will it do what it’s supposed to do
  • 7. ParasoftCopyright© 2015 77 Importance of Testing How do you know when you're done? How do you know if a fix for a minor bug broke a major function of the system? How can the system evolve into something more than is currently envisioned? Testing,both unit and functional,needs to be an integratedpart of the developmentprocess.
  • 8. ParasoftCopyright© 2015 88 Testing delivers A maintained suite of unit tests:  Represents the most practical design possible  Provides the best form of documentation for classes  Determines when a class is "done"  Gives a developer confidence in the code  Is a basis for refactoring quickly
  • 9. ParasoftCopyright© 2015 99 Why Testing is Often Ignored • Too much effort • Too much time • We’re on a schedule – no time to test. • Why is there always time to do it over, but never to do it right? Perceived as “burdensome” • “I don’t need to test my code – I don’t make mistakes.” • Testing means I have to admit that I might have made a mistake. • I don’t like to test – it’s beneath me. • Testing isn’t fun – I just want to code! • That’s for the QA dept. Developer Ego
  • 10. ParasoftCopyright© 2015 1010 Definitions  Unit  Functional  Regression
  • 11. ParasoftCopyright© 2015 1111 Unit Testing Unit tests that validates your method behaves a certain way given a specific parameters  Regressions testing  Validate behavior of existing code hasn’t changed  Scheduled and run automatically  Test Driven Development  Validate behavior of new code to be written  Created before developing, turned into regression tests after
  • 12. ParasoftCopyright© 2015 1212 Functional Testing • Unit tests (Junit, CppUnit, Nunit, etc) • Integration tests • Scripted tests • Manual tests Incarnations of functional tests • Manually written • Machine generated from application tracing • Machine generated from capturing traffic • Machine generated from recording clicks Ways to createfunctional tests
  • 13. ParasoftCopyright© 2015 1313 Regression Testing • Functional unit tests that pass • Machine generated unit tests for current behavior • Unit test written by developers and testers • Tests written to validate bug fixes Contributors to the regression test suite • Unwanted change in behavior – fix the code • Intentional change in specification – update test controls Regression test failures
  • 14. ParasoftCopyright© 2015 1414 What’s the Difference? Unit Tests • The code is doing things right • Written fromprogrammers perspective • Confirm code gives proper output based on specific input Functional Tests • The code is doing the right thing • Written fromusers perspective • Confirm the system does what the user expects it to do Regression Tests • It still works
  • 15. ParasoftCopyright© 2015 1515 Why Do Unit Testing Software bugs are inserted during coding phase, but often aren’t found until functional testing, or worse they are found by customers. The longer a bug stays in the system, the more expensive it is to fix it. Unit testing is a strategy that allows you to find out if your system is behaving the way you expect early in the SDLC. Unit testing allows for easy regression testing, so you can find out quickly whether you have introduced some unexpected behavior into the system.
  • 18. ParasoftCopyright© 2015 1818 What’s Important Unit tests require a LOT of care Unit testing is a continuous operation Test suite maintenance is a commitment Control data (assertions) in the code
  • 19. ParasoftCopyright© 2015 1919 Test incorporation  Take existing unit tests and schedule them into build process  Run and fix tests as part of build process  Ideal goal: 0 failures and 100% code coverage  Realistic goal: 10% test failures and 80% code coverage  If the unit test suite is noisy, don’t qualify the build based on assertion failures
  • 20. ParasoftCopyright© 2015 2020 Unit Test Creation  Maintainability  Proper assertions  Nightly runs  Tests should be:  Automatic (no human input or review)  Repeatable (no strange dependencies)
  • 21. ParasoftCopyright© 2015 2121 Legacy Test Suites  Leverage your existing suite  Clean up incrementally  Set policy based on current results  Tighten policy when in compliance
  • 22. ParasoftCopyright© 2015 2222 Maintaining and Creating UT  Maintaining is more of a problem than creating.  Don’t create a test if you can’t or don’t plan to maintain it.  Creating as you go creates a better test suite  Tests not run regularly become irrelevant
  • 23. ParasoftCopyright© 2015 2323 Write tests with the code Create the test when you’re writing the code Have a test for every task you complete Increases understanding Improve assertions
  • 24. ParasoftCopyright© 2015 2424 Connect Unit Tests  Associate tests with Code and Requirements  Naming Conventions should have meaning  Use code comment tags @task @pr @fr  Use check-in comments @task @pr @fr  Improve change-based testing
  • 25. ParasoftCopyright© 2015 2525 Specific Generation  Don’t be lured by 100% coverage  Auto assertions are not meaningful unless validated  Review the tests as you work on the code
  • 26. ParasoftCopyright© 2015 2626 Code Review Test  Code for unit tests should be reviewed  Consider doing test-design review  Ensures you’re testing what you think you are  Helps reduce noise  Helps improve understanding  Review the code and the test code together
  • 27. ParasoftCopyright© 2015 2727 Testing Exception Handling  Frequently Skipped  Prevents crashes  Prevents death spiral  Rule of thirds  1/3 basic functionality  1/3 advanced features / infrequent settings  1/3 error handling
  • 28. ParasoftCopyright© 2015 2828 All About Assertions  Verifies that the code behaves as intended  True/false  Null or not null  Specific values  Complex conditions
  • 29. ParasoftCopyright© 2015 2929 Why Assert?  Excuses:  My code already has console output  I can check it visually/manually  Binary output (pass/fail)  Part of overall test suite  No human intervention
  • 30. ParasoftCopyright© 2015 3030 Assertion failures Introduced coding error • Fix the new code Functionality changed • Update the assertion Improper assertion • Comment it out
  • 31. ParasoftCopyright© 2015 3131 Assertion Policy  Assign failures as tasks  Author of the test or of the changed code  Try to reach developer that has the highest chance to understand the change  Developer assesses failure:  Bug (fix)  Changed functionality (update assertion)  Bad assertion (improve or remove) - don’t delete; instead, comment out
  • 32. ParasoftCopyright© 2015 3232 What to assert  Ease of creating assertions leads to poor choices  Anything CAN be checked – but should it be?  Assertions should be connected to what you’re trying to test  Assertions should be logically invariant  Check values by range, not equivalence  “What do I expect here logically?”
  • 33. ParasoftCopyright© 2015 3333 How to recognize bad assertions  How often do you WANT to manually verify an assertion?  Daily or near-daily checking indicates poor assertion.  Troublesome possibilities:  Date  User or machine name  OS  Filesystem names and paths
  • 34. ParasoftCopyright© 2015 3434 Missing Assertions  Error was found after code changed  Test suite never caught the error  Update unit-test with new assertion  Write new unit tests as necessary
  • 36. ParasoftCopyright© 2015 3636 The Challenge: Management’s Perspective  Need tests to reduce risks  Testing takes time from features/fixes  Not enough time  Not enough people  Tests and reports lack context
  • 37. ParasoftCopyright© 2015 3737 The Challenge: Development’s Perspective  Hundreds of failing or broken tests  Test requirements unclear  Existing tests are dubious  Deadline pressure
  • 38. ParasoftCopyright© 2015 3838 Spring Cleaning Solution  Throw out the useless, old junk  Identify and eliminate “noisy” tests  Organize the remaining chores  Prioritize unit test tasks  Keep it clean  Establish and follow a routine test maintenance plan
  • 39. ParasoftCopyright© 2015 3939 Throw out the Junk: Identifying Noisy Tests Tests that are fragile • Pass/Fail/Incomplete resultsfrequentlychange • Frequentchangesare requiredto keep up-to-date Tests that are outdated • More than“n” releaseshaveoccurred despitethistest failure • The test appliesto legacy codethat is frozen • The test hasnot been executedfor “x” periodof time Tests that are unclear • It takes more than5 minutesto understand why thetest exists • The failuremessage is incorrect/unhelpful/irrelevant • There is no associated requirementordefect Be merciless!
  • 40. ParasoftCopyright© 2015 4040 Organize Chores: Prioritize Tasks with Policy All tasks are created equal Some tasks are more equal than others Policies establish prioritization and assignment
  • 41. ParasoftCopyright© 2015 4141 Keep it Clean: Establish a Routine Process  Management and Development need to co-define a Policy  Clear testing goals that tie tests to business needs  Clear delineation of responsibility  Test creation and deletion  Test failureresolution  Naming conventions  Peer review  Clear and frequentcommunication  Understand the technical and business impact  Enhance traceability to project requirements  Ask questions  Focus on safety/quality, not coverage  Keep the number of tests minimal  Run all tests on a regularly scheduled, frequent basis  Clean as you go
  • 42. ParasoftCopyright© 2015 4242 Spring Cleaning Recap  Find and delete “noisy” tests  Use policies to prioritize, assign, and plan  Co-design and follow a process to keep it clean
  • 43. ParasoftCopyright© 2015 4343  Web  http://www.parasoft.com/jsp/resources  Blog  http://alm.parasoft.com Social  Facebook: https://www.facebook.com/parasoftcorporation  Twitter: @Parasoft@MustRead4Dev @CodeCurmudgeon  LinkedIn: http://www.linkedin.com/company/parasoft  Google+: +Parasoft +ArthurHickenCodeCurmudgeon  Google+ Community: Development Testing Because its Better