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

Creating dependent test cases


#1

Hi,
I am new to Testrail and have one question. The question is "Can I link multiple testcases either from same or different Suite?, And if the first testcase fails all the linked(dependent) testcases will fail or no?"
Example:
I have a Suite which contains 5 testcases and all are linked (As of this writing, I’m unaware if this feature is supported by TestRail). Out of which first testcase is for the Login. Now, suppose the first testcase fails, then will it fail all the remaining 4 testcases automatically as they are dependent on login.

I hope my question is clear, please let me know in case of any further updates needed.

Thanks,


#2

Hi,

Thanks for your posting! You can easily link other test cases via the following syntax: [C17]. TestRail would replace this with a link to the test case with ID 17. Automatic failing of cases based on results of other cases is currently not possible. You could, however, think about consolidating the multiple cases in a single test case and use TestRail’s separate steps feature instead:

http://docs.gurock.com/testrail-faq/config-steps

So, instead of using many smaller cases, you could use one case with one step for each previous case. You could still assign a separate status to each step (case) in this case. Would this also work for you?

Regards,
Tobias


#3

Hi Tobias,

What would you suggest if a case would depend on a result of another test?

i.g.
to put the camera in front of the object by distance: X cm

The X would be calculated by the result of another test case (i.g. the view angle of the lens)

Thanks.

Alston


#4

Hi Alston,

I would check if it’s possible to combine this into a single test and this would probably be the easiest option. Would this work in this case?

Cheers,
Tobias


#5

Hi Tobias,

No. There would be a lot of cases which depends on the previous case. It is impossible to combine all those cases into one case.
let’s say that the pre-configuration of those cases depends on the result from one case.

Thanks.

Alston


#6

Hi Alston,

Thanks for your reply. If you have ordered your cases/tests according to your dependencies, there would already be some form of structure that would make it easier to view previous results. For example, if C5 depends on C4 (and both cases are next to each other in the repository), it’s really easy to toggle through your tests and results with the three-pane view:

https://blog.gurock.com/testrail-5-1-introducing-testrail-fasttrack/

Cheers,
Tobias


#7

I like to hope on that and would also like to see a more rigid way of defining dependencies between cases.

So that when executing a test, that depends on another test, one can only add a result when the depending of test case has passed.


#8

Thanks for your feedback, Andreas!

Cheers,
Tobias