[SpecFlow+Runner] Override the value of testThreadCount variable from Azure Pipelines
Not plannedWe currently maintain testThreadCount in default.srprofile
<Execution stopAfterFailures="0" testThreadCount="3" testSchedulingMode="Sequential" retryFor="None" apartmentState="MTA"/>.
Its a good option to have this managed through a variable that can override this property from Azure Pipeline Variables. The current option we have is to create multiple .srprofile files to achieve it in pipeline
-
You could easily do that via simple powershell task in Azure DevOps. All you need is to have .srprofile copied to some place where your test agent resides. And then just make this testThreadCount value an AzDo variable.
Example:
$file = "$(SearchFolder)\Default.srprofile"
[xml]$config = Get-Content $file
$ns = New-Object System.Xml.XmlNamespaceManager($config.NameTable)
$ns.AddNamespace("ns", $config.DocumentElement.NamespaceURI)
$node = $config.SelectSingleNode("//ns:TestProfile//ns:Execution", $ns)
$node.SetAttribute("testThreadCount", "$(NumberOfThreads)")
$config.save($file)$(SearchFolder) is a place where your file is stored.
1 -
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/
0
Please sign in to leave a comment.
Comments
2 comments