I created global parameter "VarName" for Test Suite.
There is a code module in the current Test Suite. I created local variable (right click in code file->insert new module variable) "LocalVarName" inside this code module. During the test (code module) execution I try to use this variable.
In *.rxtst file I binded local variable with global variable (right click on code module->data binding)
Global parameter <TestSuiteName>.VarName to local parameter <CodeModuleName>.LocalVarName
I try to execute test via command line:
Code: Select all
<projectName>.exe /pa:VarName="TestData"
Is there any possibility to get global parameter value in code module instead of line below?
Code: Select all
TestSuite.Current.Parameters["VarName"]
Thanks!
Code from code module:
Code: Select all
...
string _LocalVarName = "";
[TestVariable("ac442751-aeb7-4b10-b4af-66ac5fa0e8c9")]
public string LocalVarName
{
get { return _LocalVarName; }
set { _LocalVarName = value; }
}
/// <summary>
/// Performs the playback of actions in this module.
/// </summary>
/// <remarks>You should not call this method directly, instead pass the module
/// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
/// that will in turn invoke this method.</remarks>
void ITestModule.Run()
{
Install.InstallApp(LocalVarName); //LocalVarName is empty (always)
//Install.InstallApp(TestSuite.Current.Parameters["VarName"]);
}
...