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

How to set a result field to a common value for all tests in a test run?

Oftentimes, I have some result field(s) which have the same value for every test in a run. The most prominent of which is the Version field. It’s rather annoying–and error-prone–to have to fill that in for every single test in a test run when it’s the same value over and over. How do I do this?

I found a related post. The OP there has different hardware revisions, and one test run will be against a single hardware revision. I actually have something similar. Even if set up my “hardware revision” field as a dropdown as suggested there, that’s still 2N extra clicks for N test cases, and I might misclick any one of them and accidentally set the wrong version.

The other suggestion was to just mention such things in the test run name or description. That also seems unsatisfactory since (a) I can’t require its inclusion, or that it’s specified a certain way (b) won’t be able to filter by it.

So is there some other alternative I’m missing?

Hi @nstiurca,

Thanks for the post! If you have a result field which varies from test run to test run, we would typically recommend using a test run title or description field to hold this value instead of entering it into each test result.

It would be possible to use a custom result field with a default value, however this may not be useful if this value will change from run to run, as this default value would also affect any other open test runs and would require updating your TestRail settings with each run.

It may also be possible to use a UI script to pre-populate this value in the result dialog based on a test run title or other data in the web page. We have also had other teams use a UI script to modify the add result dialog in order to set default values, conditional fields, etc. You may also be able to find a sample script for the ‘Add Result’ dialog elsewhere in our forums and then customize this to meet your needs.

Hope this helps,
Jon