Two testers in action

Testing CRUD functionality is not so easy

TL;DR

In this post I will present challenges that tester should take into account when he needs to test CRUD functionality. Approach is black box testing and we will use only user UI interfaces.

Black box is testing approach where tester designs tests from his (research-based) knowledge of the product’s user characteristics and needs, the subject area being automated, the product’s market, risks and environment (hardware/software)[source].

CRUD acronym stands for Create, Retrieve, Update, Delete, set of features that usually come together in every application. How to test those features?

As a tester, you can not start to test CRUD functionality until Create feature is developed because other three features depend on it.

So you start with testing Create feature. But how you will be sure that this feature actually works? You can use user interface of Create feature. You will examine feature response messages. Like in happy path, “You successfully created object X!”. But is this enough? In order to check the Create feature, you can also use Retrieve feature. Retrieve feature would check is created data actually stored in the application and are all object data attributes accessible via Retrieve feature.

So, in order to be able to test Create feature, it is always handy to have working Retrieve feature. This is important information when you will be asked question: what do you need in order to be able to test Create feature?

In order to be able to check that Retrieve feature works, you need to be able to create test data. You need Create feature.

What about Update feature? First you need to Create data, then you can Update that data, but in order to be able to check that Update actually works, beside observing Update response messages, you will also use Retrieve feature (like in testing Create feature).

Delete feature needs Create and Retrieve features. With Create you create data, and with Read, you are checking that deleted object is actually deleted.

Conclusion

CRUD features are dependant on each other. And there is a risk that you are checking feature with other feature that might have issues.

Feature: Create

Helper feature: Retrieve

Test design: can I confirm that all created attributes are actually stored in the application?

Feature: Retrieve

Helper feature: Create

Test design: can I confirm that all created attributes are accessible via Retrieve feature?

Feature: Update

Helper features: Create, Retrieve

Test design: can I confirm that only updated attributes are updated? Can I confirm that not updated attributes are not changed?

Feature: Delete

Helper features: Create and Retrieve

Test design: can I confirm that deleted object is actually deleted from the application?

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Leave a Reply

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