Before you can set the values of variables for the execution of a keyword-driven test, you have to create the
project.
When executing keyword-driven tests that are part of an automation framework and that are managed in a test management tool,
for example
Silk Central, you can set the values of any variables that are used for the execution of the keyword-driven test in
Silk Test Classic. To set the values of global variables for the entire project, which means that these values are used whenever a
Silk Test Classic user executes the keyword-driven test assets in this project, perform the following actions:
-
Open the project that includes the keyword-driven test.
-
Right-click the folder
Data of the project and select
New File.
A new untitled file is opened in the editor.
-
Add new lines to the file to specify the variables.
The format for a new variable is:
name=value
For example, to specify the two variables
user and
password, type the following:
user=John
password=john5673
-
In the menu, click
.
-
Type
globalvariables.properties into the
File name field.
-
Click
Save.
-
Open the keyword-driven test that you want to execute.
-
In theKeyword-Driven Test Editor, edit the parameters to use the new variables.
Use the following annotation:
${variable name}
For example, in the following keyword-driven test, the
${current user} parameter uses a global variable:
Whenever
the keyword-driven test is executed from
Silk Test Classic, the variables are used.
Note: When you replay a keyword-driven test, which is located in
Silk Central, from
Silk Test Classic, the result file (.xlg) is saved into the folder of the current
Silk Test Classic project.