9/25/2017 — Blog Assignment 2 – CS 443

Equivalence Class Testing
This week we turn to equivalence class testing. Equivalence class testing is a black box software testing technique that divides function variable ranges into classes/subsets that are disjoint. It is beneficial for two cases:
When exhaustive testing is required.
When there is a strong need to avoid redundancy.
Equivalence class testing selects test cases one element from each equivalence class. This helps to reduce redundancy.

The article introduces the main problem with software testing which is how to find input values that will provide the most coverages in the fewest possible tests. It addresses the problem with redundancy which can be minimized with equivalence class testing. It introduces the following problem: Suppose a there is a UI for creating user accounts. The Username is between 1 and 25 characters, spaces are not allowed. The gender can be Male or Female. It would be impossible to test all combinations of inputs, more than 1 million, instead we turn to equivalence class testing.

Breaking the conditions down EC reduces the test cases into 5 equivalence classes.

Field vs Description
User Name vs Empty
User Name vs Length > 25 (no spaces)
User Name vs Length > 25 (containing a space)
User Name vs Length >1 and = with >.
Sex vs Neither Male nor Female

The ECs produces the following test cases:
Valid name from #1 and valid Sex from #2
Invalid name from #3 and valid Sex from #2
Invalid name from #4 and valid Sex from #2
Invalid name from #5 and valid Sex from #2
Invalid name from #6 and valid Sex from #2
Valid name from #1 and invalid Sex from #7
So, in all 6 test cases total with EC testing compared to more than 1 million.

I chose this post for its simplicity and example of the UI for creating user accounts. The example helps to connect the concept of EC to test cases that can be validated. So, it helps to break down the problem into different ECs and its product into different test cases. It also demonstrates the advantages of EC in helping to reduce redundancy and test time. I chose this post because it gives a good example of EC testing. It shows the shortcomings of EC testing and at the same time boundary value testing as well. Boundary value testing only requires test cases at, directly above, or below the edges/boundary of the function. This implies that in cases where there are mid-range cutoffs boundary value testing requires EC testing as well in order to validate the functionality of the tested program. Vice versa, EC testing only requires values within the equivalence classes, which implies that in cases where functions have cut-offs at the boundary, boundary-value or edge testing would be required to fully test the program. However, as the already stated and shown in the example, EC testing does not test the boundary value conditions defined in boundary value testing, which suggests one disadvantage.
I chose this article because it highlights the important aspects, advantages, and disadvantages of EC testing through the UI example, which demonstrates a real world application of EC testing in software development that every programmer will come across.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s