I am using Specflow+ Runner for my automation testing using Selenium/Appium grid at the backend and want to test my scripts in parallel across multiple Browsers
I have referred to the examples from Specflow examples repository (https://github.com/SpecFlowOSS/SpecFlow.Plus.Examples/tree/master/SeleniumGridWebTest) and using the following Default.srprofile
<?xml version="1.0" encoding="utf-8"?>
<TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5">
<Settings projectName="SpecflowTrial" />
<Execution stopAfterFailures="0" testThreadCount="5" testSchedulingMode="Sequential" retryCount="0" apartmentState="MTA" />
<Environment testThreadIsolation="Process" />
<TestAssemblyPaths>
<TestAssemblyPath>SpecflowTrial.dll</TestAssemblyPath>
</TestAssemblyPaths>
<Report>
<Template name="ReportReportTemplate.cshtml" />
</Report>
<Targets>
<Target name="Browser_Safari">
<Filter>Browser_Safari</Filter>
<DeploymentTransformationSteps>
<EnvironmentVariable variable="Test_Browser" value="Safari" />
</DeploymentTransformationSteps>
<Environment testThreadIsolation="Process" />
</Target>
<Target name="Browser_Chrome">
<Filter>Browser_Chrome</Filter>
<DeploymentTransformationSteps>
<EnvironmentVariable variable="Test_Browser" value="Chrome" />
</DeploymentTransformationSteps>
<Environment testThreadIsolation="Process" />
</Target>
<Target name="Browser_Firefox">
<Filter>Browser_Firefox</Filter>
<DeploymentTransformationSteps>
<EnvironmentVariable variable="Test_Browser" value="Firefox" />
</DeploymentTransformationSteps>
<Environment testThreadIsolation="Process" />
</Target>
</Targets>
<TestThreads>
<TestThread id="0">
<TestAffinity>testpath:Target:Browser_Safari</TestAffinity>
</TestThread>
<TestThread id="1">
<TestAffinity>testpath:Target:Browser_Chrome</TestAffinity>
</TestThread>
<TestThread id="2">
<TestAffinity>testpath:Target:Browser_Firefox</TestAffinity>
</TestThread>
</TestThreads>
</TestProfile>
where the filters are applied to tags on the scenarios
My problem is that when running all tests in parallel, sometimes the tests are triggered across different browsers and sometimes it is triggered for the same Browsers, in this case, all run on either Chrome, Firefox or Safari.
What is the correct configuration that should be used to trigger tests in parallel across different browsers?
Update:
The above question was resolved bumping the SpecRun to version 3.6.2
question from:
https://stackoverflow.com/questions/65935913/configuring-specflow-runner-for-parallel-test-execution-across-different-browse 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…