In the first of our articles detailing ISTQB test techniques, we’re focussing on Boundary Value Analysis. It’s defined as: “A black-box test technique in which test cases are designed based on boundary values.”
But before we dive into Boundary Value Analysis, let’s start with what we mean by black-box testing.
What is black-box testing?
Black-box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This effectively means that there’s no need to look at the internal code structure, implementation details and internal paths of the software.
What is Boundary Value Analysis?
As a type of black-box testing, Boundary Value Analysis (BVA) is the application of a functional behavioural analysis testing technique at the boundaries of structured form-fields. It is used to test the user-experience and the behaviour of the form-field, for presence or absence of specific validation rules to comply with the type of expected user-data.
This testing is all done at the input boundaries, rather than by finding any errors in the centre of input. And by simply testing at the boundaries, there’s no need to test all the values in a given range.
Application of Boundary Value Analysis
Let’s take the example of an address, specifically the Town field. Given that we have an address, and specifically a field for a Town on the form, the Black-box Boundary Value Analysis test scenarios need to cover the testing of the field.
- We know the longest place name in the UK is Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
- We also know the shortest place name is Ae, in Dumfries and Galloway
Applying Boundary Value Analysis, we view each of the rules in turn and identify the tests which must be covered to ensure that the validation rule is being applied. To do this, we create a test cases table as shown below:
|Test Case (TC) Reference Number||Behaviour to identify|
|TC1||At the Minimum value|
|TC2||At a value just above the Minimum value|
|TC3||At a median value|
|TC4||At a value just below the Maximum value|
|TC5||At the Maximum value|
Using a different example, say a developer writes code for an amount text field which will accept and transfer values only from 10 to 2000. The test engineer checks it by entering 9 into the amount text field and clicks on the transfer button. This would be an invalid test case and an error message would be shown, as the boundary values are set at 10 and 2000. Since the number entered was less than the boundary values it would result in an error.
The valid test cases are as follows:
- TC1: 10
- TC2: 11 (min+1)
- TC3 1000
- TC4 1999 (max-1)
- TC5: 2000
Why use Boundary Value Analysis
The Boundary Value Analysis technique delivers an effective, logical, efficient, fundamental approach to testing. The benefit of using this technique is that the testing does not have to test ALL values in the given range.
For more information on our approach to software testing, get in touch with the team below. Whether you are starting on your software testing journey or would like to review where you are and find ways to improve, we can help.