[Specflow+Runner] Support for TestRunParameters
Not plannedSpecflow+Runner Specrun doesn't support TFS 2015 Secret Variables:
In a TFS 2015 build definition it's possible to set Variables. These variables are also set as environment variabeles on the agent, and so usable in Specflow / Specrun tests.
https://www.visualstudio.com/en-us/docs/build/define/variables
TFS 2015 also supports Secret Variables, these can be passed into the test run with Override Test Run Parameters. Very usefull for example for passwords used in tests. They are not set as enviroment variables .
If I set a secret variable in TFS it can override my TestRunParameters set in .runsettings, for example:
#defined in runsettings file:
<TestRunParameters>
<Parameter name="password" value="nothing yet" />
</TestRunParameters>
In the Visual Studio Test task in TFS 2015 : Override TestRun Parameters : password=$(Secret_Password_Variable)
When using MsTest as test runner I can access this variable trough : Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Properties['password']
However, Specrun doesn't support the TestRunParameters, and therefore also not the overrided parameters from TFS. The TestContext is only available when the Specflow tests run with the MsTest unitTestProvider, and not with SpecRun.
-
Official comment
We are stopping the maintenance of the SpecFlow+ Runner, so I am closing this feature request.
For more details, please have a look at our blog post about it: https://specflow.org/using-specflow/the-retirement-of-specflow-runner/
Please sign in to leave a comment.
Comments
1 comment