A thought regarding boundary value analysis

The Art of Software Testing” by Glenford J. Myers is a classic book about software testing and I often use it as a reference. In the book, Glenford J. Myers wrote that “test cases that explore boundary conditions have a higher payoff than cases that do not”[1]. Boundary Value Analysis is a widely used testing technique that is used to explore boundary conditions.  

Myers gives a detailed overview of how to conduct boundary value analysis. A very high-level synopsis of Myers’ description of the testing technique could be described in the following way: 

  • A “well selected”[2] test case meets two criteria: it reduces by one the number of test cases to be developed and it covers a large set of test cases. These two criteria can be met by using equivalence partitioning. 
  • He describes how to conduct equivalence partitioning. He says that you can identify equivalence classes by taking a condition, often a phrase in the specification, and partitioning it into two or more classes. If a test case in an equivalence class finds an error then testing other members of the equivalence class should find the same error.
  • Boundary value analysis is preceded by equivalence partitioning and tests the boundaries of equivalence classes. Myers points out that the test case design should consider the output of the test as well as the inputs to the tests.
  • Myers gives an example of test cases developed using boundary value analysis for an input condition specifying a range of values. He wrote that you should create test cases for the ends of the range and for test cases for invalid inputs beyond the end of the range. 

Myers also says that “it is difficult to present a cookbook for boundary value analysis”, that boundary value analysis “requires a degree of creativity” [1] and that boundary value analysis “is more a state of mind than anything else”[3].

A friend of mine recently had to test a UI with two numeric input fields and started by testing the boundary values of the two fields. He quickly found a bug. My friend said that he had used boundary value analysis to find the bug but he had not created equivalence classes. My friend just started testing the boundary values. 

Myers says boundary value analysis “is more a state of mind than anything else” so, using Myers’ comment, could my friend say that he had used boundary value analysis to find the bug? No, I don’t think he could describe my friend’s testing as “boundary value analysis” because he had not created equivalence classes before testing boundary values.

References:

[1] The Art of Software Testing by Glenford J. Myers (1979, p. 50)

[2] The Art of Software Testing by Glenford J. Myers (1979, p. 45)

[3] The Art of Software Testing by Glenford J. Myers (1979, p. 51)

Published by Mike Harris

Mike has been a testing professional for over 20 years. He has been a Test Lead and has also worked as a part of waterfall, lean and agile teams. He has set up and led a Testing Community of Practice and been part of a successful agile transition. He is Vice-Chair of the British Computer Society’s Specialist Interest Group in Software Testing. He also contributed to the e-books Testing Stories and How Can I test This?

Join the Conversation

  1. Unknown's avatar
  2. Unknown's avatar
  3. Mike Harris's avatar

5 Comments

  1. “A well selected test case…covers a large set of test cases.”

    Can you explain this a little more? If you’re using test cases as the basis of your tesing, then one test case will only cover one test case (even though it could cover multiple test conditions). Whether or not that is a well selected test case (or indeed the right thing to do) is, like, totally debatable, without knowing the context.

    Like

    1. Using boundary value analysis to create a test case means that the test case will cover many test cases, enabling you to create tests efficiently. The test case may be derived during exploratory testing or used in automated testing. I recommend reading The Art of Software Testing by Glenford J. Myers for a full explanation of how to do boundary value analysis.

      Like

Leave a comment

Design a site like this with WordPress.com
Get started