Skip to main content
Skip table of contents

Including tests with variable replacements

It is possible to include a test case into another test replacing some variables with values. The variables must be surrounded by $ signs to be recognized as such.

Example you have a test case TC-15 login to system

StepExpected

Browse to site ****

Login form is shown
Enter user $user$OK button becomes active
Click OkPassword field is shown
Enter password $password$Login button becomes active



Now you can include this test case into another test: TC-300 login test, e.g. like this

StepExpected
include:TC-15?user=readonly&password=roLogged in as read only user
do something
include:TC-15?user=readwrite&password=rwLogged in as read write user


When creating the XTC from TC-300 you will get XTC-1333 login test

StepExpectedActualPassed/Failed

Browse to site ****

Login form is shown

Enter user readonlyOK button becomes active

Click OkPassword field is shown

Enter password roLogin button becomes active

do something


Browse to site ****

Login form is shown

Enter user readwriteOK button becomes active

Click OkPassword field is shown

Enter password rwLogin button becomes active

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.