Let us take a simple social networking application. You can create a new account, edit your profile, add a friend, delete a friend, add comments, delete comments, reload your photograph, view the comments by others etc. Take an instant messenger like Skype. You can add a contact, rename the contact, edit your text, delete a contact etc. Look at a documenting tool like MS Word. You can create a document, modify its contents, rename it, delete some portions of it etc.
So, what do you see as a common set of activities in all the above? Add something, edit or modify it, read or view it, delete it. In other words, Create Read Update Delete and that is CRUD. There is no exception to this in software. Every software will have to necessarily support these features; so if we chase these, we can test a software in a structural manner. Once you read the specifications of the software, see whether that requirement falls under create or read or update or delete. Once you identify that, you can blindly apply the following test conditions to that particular requirement.
If the requirement falls under Create (also termed as New, Add, Insert) category, you need to define test conditions for:
- Creating a brand new item one at a time
- Creating a duplicate item
- Creating more than one items in a single shot (if applicable)
- Reading an existing item one at a time
- Reading more than one existing items at a time
- Reading a non-existing item
- Reading in a sorted order (such as sort a grid in ascending or descending order)
- Read an item based on wild cards (such as search or filter items)
If the requirement falls under Update (also termed as Edit, Modify, Change) category, you need to define test conditions for:
- Update an existing item one at a time
- Update more than one existing items
- Update a non-existing item
- Delete an existing item one at a time
- Delete more than one existing items
- Delete a non-existing item