Consistency Tests for Your App: Use Them to Catch Bugs Big or Small

One type of testing I like to do regularly on an app is a consistency check. Below, I’ll explain what  I mean by that and give some examples of possible errors it might pick up.

 

Inputs

Data will come into your system in one way or another, but are all the ways treated the same? If the usual method is entering data via a GUI, there might also be a way that users enter data by importing a file such as a CSV. Does the validation between those two types of entries match?

Another possible mismatch could be if you have a web ite and a mobile app. Does the validation for both of them match or can you end up with mismatched data?

Edits

A lot of apps are basic CRUD apps. Does the U match the C? Can you edit a record so it doesn’t match the validation that creation has? For example, if creation tries to make sure fields are unique, can this be bypassed by editing records to have the same value?

Actions

Is one dialog dismissed by hitting the X in the top right corner while another dialog is dismissed by a Close button? Does one section have a search function and another does not? Or it does have the search function but with different controls?

If a user makes an error, is the error shown in a consistent manner? Or, do some parts flash up an alert while others make the offending part flash red?

If some actions can result in a lengthy process (e.g., uploading a file), are these actions treated consistently? Or, will one action have a loading spinner while another shows a progress bar on the dialog?

Data Display

Is data displayed consistently throughout the app? Pay special attention to prices and dates!

While doing this test, you can also check to see if some data is never used. For instance, why are you insisting that the user enter a middle initial?

Labels

Is there consistency throughout the app with the labeling of controls, headers, and fields? Does the creation dialog ask for a surname while the table header shows last name? Is it called a Store on one page and a Marketplace on another?

Being Consistent

Having a design and style guide upfront can remove a lot of these issues along with types in your code, but many systems evolve over time and inconsistencies can creep in. Running a regular consistency check can help catch them. It also has another advantage in that, as you do the consistency checks, you might notice other aspects of the system that could benefit from a test session.

This post itself has some inconsistencies. Rather than leave it as an exercise for the reader, I’ll point out that sometimes I call them consistency checks and sometimes consistency tests…