Testing Data Structure Boundaries

Testing Data Structure Boundaries

Soumen Sarkar wrote an interesting article in LinkedIn about how data structure boundaries are not thoroughly tested during the initial implementation of software, which led to issues cropping up some 20 years later. Let’s talk about the testing strategies and things to pay attention to regarding testing data structure boundaries in this blog.

As pointed out in the blog, software gets implemented in architectures that are old. That specific example of having 2^32 entries in an integer array was inconceivable three or four decades back because of memory restrictions. But today it is possible. Then what should we do as Software Testers to make sure that data structure boundaries are well tested?

The one problem that Soumen points out is about Software Testers not having the needed resources to test. I hope that this should have been sufficiently solved in these days of cloud-based infrastructure where the development and testing teams have access to the same kind of infrastructure, so that testing does not fall behind on needs to do thorough testing.

The most important issue though is not testing the data structure boundaries when resources are available. In the example quoted in the article, the boundaries of integer datatype are breached when two very large integer values are summed, and the result becomes negative in the variable in which the sum is stored. There is also a mention about how to work-around these kind of overflows. Testing has to be done thorough to detect these kind of issues so that work-arounds can be implemented right away.

Another important consideration is to incorporate such testing strategies in the design considerations. By looking forward and foreseeing what would happen if the data structure limits would be breached because of an architecture extension, one would be able to mitigate the possibilities of those kind of defects occurring.

These kind of problems are especially known to break things in APIs because of datatypes and value overflows. In industries like Supply Chain where there’s a heavy reliance on B2B software, special emphasis has to be made to make sure that things don’t break at the seams.

For detailed test strategies for your organisation related to data, APIs, and Supply Chain software, feel free to contact me.

Leave a Comment

Your email address will not be published. Required fields are marked *