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

Creating conditional data points on test cases

Hi all,

Glad to be here.

I wanted to know whether we can make custom fields dependent on one another when conditions are met. For example, assume we’ve implemented an archive flag (TRUE/FALSE) on a test case template. However, when archived is TRUE, then user MUTS select a predefined Archive Reason.

Is there a way in which this can be achieved?

Kind regards

Hi Anwar,

TestRail doesn’t support such a conditional custom field like what you have described. However, based on your use case I would say why not make another template for archiving a test case? This template can contain all custom fields so that no data is lost, then have a “archival reason” field which is set to ‘Required’.

Another approach that we’ve seen teams use is to create a Archived test case section and move the test case into that section.

Keeping in mind that if you have completed a test run/plan, closing this would retain any test/test case information. Even if the original test case is changed or deleted. Therefore if you are archiving the test case to retain the configuration at that time, there is no need if you are closing completed test runs/plans.

Hi Vtran,

Thanks for the feedback!

So we’ve currently got a single Test Case Template with multiple data points of which Archive and Archive Reason have been included. Why we’ve done this is to start cleaning up the majority of accumulated clutter. In order to achieve this, we pull a weekly report where the Archive = YES (TRUE) and Archive Reason = ANY. Thereafter, as you mentioned, we move these Test Cases into a Archive Suite. With all that being said, it seems we’ll need to include training on this change as well as enforce these standards to ensure fields are populated correctly.