Suppose we have a contact form with these fields:

  • first name
  • last name
  • contact number
  • pin code.

While writing test cases is it a good practice to group similar test cases(TC)?

For example test cases for first name and last name will be same; similarly contact number and pin code will only accept numeric value except the length of contact number and pin code.

How do you guys generally deal with this in your test case structure?

I believe TC should be more focus on specifics and similar test cases should be grouped, this may differ from company to company.

  • Are you in a place where you have to use 'test cases'? Aug 13, 2014 at 21:00
  • @PhilKirkham Yes.. Could you please connect to your point more clearly. Scenario is about avoiding duplicate test cases. How can use case help here? Thanks
    – Vicky
    Aug 13, 2014 at 21:04

2 Answers 2


On some occassions you might do well with just giving instructions in one test case step / test description. This works if you can be sure that the tester will be able to work effectively with general description. Your example is an easy one for human, so basically you can be quite sure that tester will be able to test the right things with quite roughly detailed test case.

For more general approach, that works also on the fields where the tester does not yet know the system under test thoroughly and needs more instructions on what to test you can use test requirements.

1) Split your requirements in things that you want to test about the requirements. In your example you could make one requirement giving instructions what you should test about text fields and another about what you should test about numerical fields.

2) Link these test requirements to your test cases. As test case steps you can just list the things the tester needs to go trough ( the contact for fields ) - he will have the further instructions in the test requirement.

If you later change the specification, for example if you would add arabic support for your text fields and would need to test that you would just need to change the test requirement.


Answer:Test cases should be atomic to the component you are testing. So write a test case for each field.

Reasons: Problem in counting execution completion status: During test execution, if the first name field works and last name field does not work you will have to fail the test case. which is not correct because the first name field still works.This is one reason to maintain test cases at the field level.

Maintainability of test cases: These fields which are similar now might get need specific validation added latter, which will make test case maintenance difficult. example: if you phone number get a new validation which says it should always start with a country code of format +NN, which test case will you update?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.