January 4, 2014

12 Tips of TestTrack: Using Test Variant Field Codes to Write Better Test Case Steps

Helix ALM
It is good practice to be specific in test case steps to avoid ambiguity and unclear test results. One way to accomplish this is to use test variant field codes in steps instead of generalities. When test runs are generated, field codes are automatically replaced by the variant used to generate each test run. Let’s say you have test case steps that require logging in to an application with a specific username. You also have a Username test variant that you use to generate test runs for a variety of username values, such as Administrator, User, and Guest. Instead of using a generic test case step for logging in, such as ‘Log in with the appropriate username’, you can create a  step that includes the Username test variant field code, such as ‘Log in as %Z_USERNAME%’. Test runs generated for the Administrator variant value will contain a step that says ‘Log in as Administrator’, test runs generated for the User value will contain a ‘Log in as User’ step, and so on. Test Variant Field Code in Steps To look up test variant field codes, choose Tools > Administration > Custom Fields and select Test Variants in the Type list. If you do not have access to custom fields, ask your TestTrack administrator for help. Test Variant Field Codes See the TestTrack help for more information about using test variants and field codes.