Checking the Syntax of your TSL Script - WinRunner

When WinRunner runs a test, it checks each script line for basic syntax errors, like incorrect syntax or missing elements in If, While, Switch, and For statements.

For example, WinRunner will stop and fail a test run if it finds one of the following:

# if statement without then
report_msg("Bad If Structure");

#while statement without end condition
report_msg("Bad While Structure");
#for statement without closing brackets

You can use the Syntax Check options to check for these types of syntax errors before running your test. You can run the syntax check from the beginning of your test or starting from a selected line in your test. This enables you to quickly check your test for syntax errors so that you can catch them without having to run the entire test.

To run a syntax check for your entire text, choose Tools > Syntax Check > Syntax Check from Top.

To run a syntax check from a selected point in your test, click a line in the left gutter to set the location of the arrow. Then choose Tools > Syntax Check > Syntax Check from Arrow.


If a syntax error is found during the syntax check, a message box describes the error.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

WinRunner Topics