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

Variables in test cases


I’m a lazy admin. As such, I look for ways to efficiently spend my time. I like testrail, and have since the first day of the 30 day trial.

The one thing that I would love to be able to do is use variables in test cases. This would be exceptionally useful for writing tests where a tester will need to access a server, but that server name changes based on the environment being tested.

As it stands today, if I need to write a test that will be used for testing in DEV and QA, I have to write 2 versions of the test. Yes, I can copy the test, but that still means managing several versions of the same test.

I could even use preconditions, and list the server names for all the different environments. This shifts the burden to the tester, but humans being what they are, it introduces the possibliity for mistakes.

What I’d really like to be able to do is define variables at the test plan level which would allow the alering of the variables based on the test plan being run.



Thanks for your email. Variables and/or variances for test cases are not currently not supported but those are already on our TODO list. Have you looked into using test plan configurations for this?




I am currently reviewing various test case management tools for my company and was looking for this feature - test case variances. Is this feature implemented?



Hello Suresh,

Thanks for your posting. Variances/parameters are currently not supported as a dedicated feature but you can also look into using the separated steps control instead. This also allows you to assign a separate status per step and each individual value/parameter or group thereof can be managed as a separate step, for example:

I hope this helps!



I would also need this feature.


Hi Dan,

Thanks for your feedback! We still have plans to review this for a future update, however we don’t have any timeframe/ETA for this just yet. I’ve added a vote to this request on your behalf.



Any update regarding this feature request? It would be extremely useful to us too.


Hi Romain,

Thanks for your reply! We don’t have any updates for this at the moment, but still have plans to review this. We recommend utilizing the separate steps field for parameters/variances as you could still set a status for each parameter/step during test execution. I’ve added your vote to the request as well.



Having the ability to use variables in test cases which could be modified when creating a test run or plan would be very useful for us too.