The Case Against Test Cases

Slides:



Advertisements
Similar presentations
Test process essentials Riitta Viitamäki,
Advertisements

Thoughts on Systematic Exploratory Testing of Important Products James Bach, Satisfice, Inc.
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
HP Quality Center Overview.
Data Mining Methodology 1. Why have a Methodology  Don’t want to learn things that aren’t true May not represent any underlying reality ○ Spurious correlation.
IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
Chapter 10 Algorithmic Thinking. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives List the five essential.
Lesson Overview 1.1 What Is Science?.
Computer Science 313 – Advanced Programming Topics.
Planning under Uncertainty
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Discrete-Event Simulation: A First Course Steve Park and Larry Leemis College of William and Mary.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Overview of Software Requirements
Swami NatarajanJuly 14, 2015 RIT Software Engineering Reliability: Introduction.
Recall The Team Skills Analyzing the Problem
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
This program is provided with compliments from By Doug Steward.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Science Inquiry Minds-on Hands-on.
Chapter 17 Ethnographic Research Gay, Mills, and Airasian
Test Design Techniques
TEST CASE DESIGN Prepared by: Fatih Kızkun. OUTLINE Introduction –Importance of Test –Essential Test Case Development A Variety of Test Methods –Risk.
Terms: Test (Case) vs. Test Suite
An Introduction to MBT  what, why and when 张 坚
1 Validation & Verification Chapter VALIDATION & VERIFICATION Very Difficult Very Important Conceptually distinct, but performed simultaneously.
Research Methods in Psychology (Pp 1-31). Research Studies Pay particular attention to research studies cited throughout your textbook(s) as you prepare.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Software Testing Course Shmuel Ur
From Use Cases to Test Cases 1. A Tester’s Perspective  Without use cases testers will approach the system to be tested as a “black box”. “What, exactly,
Chapter 2 Research in Abnormal Psychology. Slide 2 Research in Abnormal Psychology  Clinical researchers face certain challenges that make their investigations.
1 Chapter 1 Research Methods When sociologists do quantitative research, they generally use either surveys or precollected data.quantitative research Qualitative.
Observation & Analysis. Observation Field Research In the fields of social science, psychology and medicine, amongst others, observational study is an.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Descriptive Research. Observation: Can you see the behavior? Is it a sensitive topic? Do you have a lot of time? Do you know what you are looking for?
What is software testing? 1 What are the problems of software testing? 2 Time is limited Applications are complex Requirements are fluid.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Where did plants and animals come from? How did I come to be?
Lesson Overview Lesson Overview What Is Science? Lesson Overview 1.1 What Is Science?
Copyright © , Satisfice, Inc. V1. James Bach, Satisfice, Inc. (540)
Session # Rational User Conference 2002 Author Note: To edit Session # go to: View/Master/Title Master ©1998, 1999, 2000, 2001, 2002 Rational Software.
Lesson Overview Lesson Overview What Is Science? Lesson Overview 1.1 What Is Science?
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Adapted from work by Randy Bell Oregon State University Scientific Theories & Laws.
Lesson Overview Lesson Overview What Is Science? Lesson Overview 1.1 What Is Science?
Inquiry. Are all hands-on science activities “inquiry?”
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
Research Methods.  Whole theories are never tested directly – rather, specific hypotheses derived from a theory’s propositions are tested through research.
An Agile Requirements Approach 1. Step 1: Get Organized  Meet with your team and agree on the basic software processes you will employ.  Decide how.
1 Chapter 4, Part 1 Basic ideas of Probability Relative Frequency, Classical Probability Compound Events, The Addition Rule Disjoint Events.
Of An Expert System.  Introduction  What is AI?  Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES.
Lesson Overview Lesson Overview What Is Science?.
Whole Test Suite Generation. Abstract Not all bugs lead to program crashes, and not always is there a formal specification to check the correctness of.
CS 5150 Software Engineering Lecture 22 Reliability 3.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
1 Prepared by: Laila al-Hasan. 1. Definition of research 2. Characteristics of research 3. Types of research 4. Objectives 5. Inquiry mode 2 Prepared.
Prepared by: Fatih Kızkun
Algorithms and Problem Solving
Recall The Team Skills Analyzing the Problem
Coverage-Based Test Design CS 4501 / 6501 Software Testing
Software Reliability Models.
A test technique is a recipe these tasks that will reveal something
Objective of This Course
Cross Cutting Concepts
Algorithms and Problem Solving
Lesson Overview 1.1 What Is Science?.
Exploring Exploratory Testing
Presentation transcript:

The Case Against Test Cases James Bach Satisfice, Inc. james@satisfice.com www.satisfice.com

“Test Cases” describe only a fraction of testing. Programming cases? Driving cases? Traveling cases? Parenting cases? Learning cases? Science cases? Living cases? Activities are not captured by "cases" Excellent testing is a rich and open-ended intellectual activity. It cannot be encapsulated into discrete procedural units.

What is a test case? There is a lot of confusion. There’s no specific definition in common use. “a computer executable script” “a sequence of discrete steps” “specific detailed input and action steps taken during the execution with predetermined expected results” “inputs, execution conditions, and expected results” “a set of input values, execution preconditions, expected results and execution post-conditions, developed to cover certain test condition(s).” Different testers have different ideas about them. Sometimes, a test itself is called a test case.

What is a test case? An artifact. A container. (“test cases are like briefcases”) A model. (a pattern, idea, spec, or schematic for a test) Part of a suite. A mystery. (“why did he write the test that way?”) A burden to the future. (is it broken? is it obsolete? is it limiting my imagination or stealing my time that I could be using to TEST BETTER?) A measure of testing progress. A unit of testing itself.

A test procedure is a way of performing a test. What is a test case? I use this definition: Compare to: A test case is one particular instance or variation of a test or test idea. A test procedure is a way of performing a test. A test activity is a line of investigation that fulfills some part of the test strategy. It can encompass many test cases.

A Testing Industry Pandemic: OCD Obsessive Case Disorder: confusing test cases with testing, such that “creating test cases” is assumed to encompass all the thinking of testing. Obsessive Counting Disorder: the belief that counting test cases tells you something meaningful about testing. Overspecified Cases Disease: the irrational compulsion to treat humans like dimwitted robots by creating recklessly specific test documentation.

In the absence of context… Test Case Counts Mean NOTHING! How much testing is 40 test cases? How much is 400? How about 40,000 test cases? You have no idea!

You shouldn’t take test case counts seriously because… Test cases are not independent. Test cases are not interchangeable. Test cases vary widely in value from case to case, tester to tester, product to product, project to project, test technique to test technique, and over time. Test case design is subjective, so counts are easy to inflate. Test cases do not— and can not—capture all the testing that occurs (example: bug investigation) Testers often don’t follow the test cases, anyway. Automated test cases are fundamentally different from sapiently executed tests. Test cases represent what’s easy to put into a test case.

(unless you want to miss lots of bugs) Danger: Testing should not be TOO FOCUSED. (unless you want to miss lots of bugs)

Focus! Start the test from a known (clean) state. To test a very simple product meticulously, part of a complex product meticulously, or to maximize test integrity… Focus! Start the test from a known (clean) state. Prefer simple, deterministic actions. Trace test steps to a specified model. Follow established and consistent lab procedures. Make specific predictions, observations and records. Make it easy to reproduce (automation helps).

De-Focus! Start from different states (not necessarily clean). To find unexpected problems, elusive problems that may occur in the field, or more problems quickly in a complex product… De-Focus! Start from different states (not necessarily clean). Prefer complex, challenging actions. Generate tests from a variety of models. Question your lab procedures and tools. Try to see everything with open expectations. Make the test hard to pass, instead of easy to reproduce.

Exploiting Variation To Find More Bugs Micro-behaviors: Unreliable and distractible humans make each test a little bit new each time through. Randomness: Can protect you from unconscious bias. Data Substitution: The same actions may have dramatically different results when tried on a different database, or with different input. Platform Substitution: Supposedly equivalent platforms may not be. Timing/Concurrency Variations: The same actions may have different results depending on the time frame in which they occur and other concurrent events. Scenario Variation: The same functions may operate differently when employed in a different flow or context. State Pollution: Hidden variables of all kinds frequently exert influence in a complex system. By varying the order, magnitude, and types of actions, we may accelerate state pollution, and discover otherwise rare bugs. Sensitivities and Expectations: Different testers may be sensitive to different factors, or make different observations. The same tester may see different things at different times or when intentionally shifting focus to different things.

Testing is about searching an infinite space in a finite time

To do that, we must use all available information…

…as it becomes available. We must explore.

The alternative to artifact-based testing is activity-based testing. Manage testing as an activity consisting of manageable activity units. An activity is something a human tester does. This can be formalized: Exploratory Testing Automatic coverage logging Session-Based Test Management General Functionality and Stability Test Procedure Testing knowledge can be propagated formally and informally through concise documentation and on-the-job training.