Test Parameters

Parameters are freely configurable input values that can be assigned to different test types and used in a variety of ways. They help to define tests by defining test data.

Test parameters that are contained within a property of a test, for example test-data for Silk Test Classic tests, are listed at the top. Unused parameters are appended to the bottom of the list and grayed out, analogous to a disabled state.

Silk Performer
These tests use predefined parameters that represent the project attributes that are defined in a selected Silk Performer test.
JUnit, Silk4J
Any JUnit and Silk4J test class can access a custom parameter of the underlying test as a Java system property; the launcher passes these parameters to the executing virtual machine using the -D VM argument. Within the test the values of the parameter can be accessed using System.getProperty("myParam").
NUnit, Silk4NET
For NUnit and Silk4NET each parameter will be set as an environment variable. Within the test the value of the parameter can be accessed using Environment.GetEnvironmentVariable("myParam").
Silk Test Classic
Parameters can be passed to Silk Test Classic by specifying them in the Test Data field in the Test Properties of the Silk Test Classic test in Silk Central. For example, if you want to pass the values of your Silk Central parameters Name and Password to Silk Test Classic, specify "${Name}", "${Password}" in the Test Data field in the Test Properties. Your Silk Test Classic script also requires two parameters, which will receive the specified values.
[-] testcase ProcessParams(STRING name, STRING password)
   [ ] Print(name)
   [ ] Print(password)
External Processes
For any test type where the execution takes place in an external process (WSH, Process Executor, NUnit, JUnit, MSTest, DotNetExplorer), each parameter will be set as an environment variable for the process. This is also the case if the parameter name matches the name of an operating system variable, so that the value of the system variable will be replaced by the parameter value, except when the parameter value is an empty string.
Silk Test Workbench
The parameter needs to be defined with the same name in the Silk Test Workbench test, to be set when being executed in Silk Central.
Configuration testing
You can override the test parameters in an execution plan. For additional information, see Execution Plan Parameters.
Custom test types
For details on custom test types, refer to the Silk Central API Help.