Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

How detailed should my test cases be?!

We are currently automating a lot of our tests. And in some of these cases they have many multiple steps.

We are trying to decide if each individual step is a test case OR should they be steps in a test. Bit concerned we will end up with thousands of test cases. I’m interested how other companies view tests. Any definitions or experiences, would be welcome.

Definition of a test case: Test Cases - A test case consists of a description of the test’s prerequisites, a list of test steps and the expected result. A test case can ideally be verified by a single tester in a short period of time and confirms a specific functionality, documents a task or verifies a project artifact.

Many thanks
Adam Smith

Hi there Adam,

This is just how we structure our automation test cases in TestRail, so not saying this is best practice.

Our test case in TestRail is as high level as possible. For example: “A user can log in.”

The automation script might be doing several things to pass that test case:
-Nav to website.
-Click “log in”
-Fill in username
-Fill in password
-Click “Log In”
-Verify successful log in

If the script is able to get through all those steps, then the test cases in test rail gets passed. If it fails on anyway one of those (say the password field becomes unclickable) then it will fail the test case.

It’s important that the test case has the steps that the script is following somewhere in its description. If it doesn’t it, can be difficult to try to reproduce the issue if you don’t know exactly what the script did.

This way you don’t end up creating thousands of scripts, but are still able to see your results from a high level. If you need to, you can drill into an individual case to see what steps the script is doing. I hope this helps/makes sense – let me know if you have any questions or want me to elaborate and give you a better example!

Cheers
Colin

Thanks very much for the reply Colin.

My view was the same as you. However, I think it’s easier when linking automatic tests via the testrail api, so its easier to have them directly linked. It also highlighted we are going a bit granular, so going to focus directly on the most critical tests from an automatic approach.

Great to see what other people are doing. Thanks again