parallel browser testing

63 views
Skip to first unread message

SS

unread,
Apr 6, 2020, 11:05:14 AM4/6/20
to spe...@googlegroups.com
Using the SeleniumWebExample example in the GitHub examples is it possible to get the browsers to run in parallel that are not the same?  At the moment all I seem to achieve is that the browsers run serially. When I have managed to get the tests to run in parallel -  they are the same type for example Chrome, Chrome as opposed to Chrome, IE. Please see more information below, such as the test output and default profile.

Test Output:

Discovering target: IE
Discovering tests from assembly: C:\Users\ssear\source\repos\SeleniumWebTest\TestApplication.UiTests\bin\Debug\netcoreapp3.0\TestApplication.UiTests.dll
Discovered tests from assembly: C:\Users\ssear\source\repos\SeleniumWebTest\TestApplication.UiTests\bin\Debug\netcoreapp3.0\TestApplication.UiTests.dll
Discovering target: Chrome
Discovering tests from assembly: C:\Users\ssear\source\repos\SeleniumWebTest\TestApplication.UiTests\bin\Debug\netcoreapp3.0\TestApplication.UiTests.dll
Discovered tests from assembly: C:\Users\ssear\source\repos\SeleniumWebTest\TestApplication.UiTests\bin\Debug\netcoreapp3.0\TestApplication.UiTests.dll
Scenario: Basepage is Calculator in CalculatorFeature (target: Chrome) -> Succeeded on thread #1
Scenario: Basepage is Calculator in CalculatorFeature (target: IE) -> Succeeded on thread #0

Where the following is above:

 "(target: Chrome -> Succeeded on thread#1)" 
 "(target: IE -> Succeeded on thread#1)"

In reality this misleading because 2 of the same browsers run in parallel, not Chrome and IE, more like Chrome and Chrome, or IE and IE. Is there something I am missing?

Slightly modified profile:
<?xml version="1.0" encoding="utf-8"?>
  <Settings projectName="TestApplication.UiTests" projectId="{347ddf1e-cf82-4520-8c9b-724ed9d7f5f0}" />
  <Execution stopAfterFailures="2" testThreadCount="2" testSchedulingMode="Sequential" retryCount="0" apartmentState="MTA"  />
  <Environment testThreadIsolation="Process" platform="x64"/>
  <TestAssemblyPaths>
    <TestAssemblyPath>TestApplication.UiTests.dll</TestAssemblyPath>
  </TestAssemblyPaths>
  <Report>
    <Template name="Report\ReportTemplate.cshtml"/>
  </Report>
  
  <Targets>
    <Target name="IE">
      <Filter>Browser_IE</Filter>
      <DeploymentTransformationSteps>
        <EnvironmentVariable variable="Test_Browser" value="IE" />
      </DeploymentTransformationSteps>
    </Target>
    <Target name="Chrome">
      <Filter>Browser_Chrome</Filter>
      <DeploymentTransformationSteps>
        <EnvironmentVariable variable="Test_Browser" value="Chrome" />
      </DeploymentTransformationSteps>
    </Target>

  </Targets>

  
</TestProfile>


Thanks


Todd J

unread,
Apr 6, 2020, 11:15:36 AM4/6/20
to spe...@googlegroups.com
Look up Selenium Grid.

On Mon, Apr 6, 2020 at 9:05 AM SS <ss...@aiimi.com> wrote:
Using the SeleniumWebExample example in the GitHub examples is it possible to get the browsers to run in parallel that are not the same?  At the moment all I seem to see is that the browsers run serially and they are the same type for example Chrome, Chrome as opposed to Chrome, IE. Please see more information below, such as the test output and default profile.

--
You received this message because you are subscribed to the Google Groups "SpecRun" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specrun+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/specrun/99fd62d8-ffc4-4640-9f73-172f260825fd%40googlegroups.com.

SS

unread,
Apr 6, 2020, 11:37:09 AM4/6/20
to SpecRun
Thanks for the reply - but I am not sure Selenium Grid solely fixes the issue as it's not responsible for ensuring the tests get divided up that way, right? This is likely the  responsibility of the underlying framework I would presume. I have looked at the example in Github I am seeing the same behavior. Is there something I am missing?
Look up Selenium Grid.

To unsubscribe from this group and stop receiving emails from it, send an email to spe...@googlegroups.com.

Easwar AB

unread,
May 4, 2020, 12:37:07 AM5/4/20
to SpecRun
Hi guys, is there a fix for this issue yet. I am using .netCore 3.0. I am experiencing the same issue mentioned here by @SS.

"Using the SeleniumWebExample example in the GitHub examples is it possible to get the browsers to run in parallel that are not the same?  At the moment all I seem to achieve is that the browsers run serially. When I have managed to get the tests to run in parallel -  they are the same type for example Chrome, Chrome as opposed to Chrome, IE. Please see more information below, such as the test output and default profile."

Can someone help us in figuring this out.

I have tried 'Process' Thread isolation as well.



666Tomsk

unread,
May 28, 2020, 5:23:20 AM5/28/20
to spe...@googlegroups.com
Hi, I am experiencing the same behaviour, I get Chrome/Chrome or Firefox/Firefox and it seems to be random which browser it chooses. This is when I set the testThreadCount="2" and run in parallel. If I set the thread count to 1, then each browser chrome, then firefox open correctly. Would really like to know how to fix this? 
I'm using SpecRun latest version 3.2.31 latest Chromedriver & Firefox drivers, WebDriver 3.141.0 and all in .NET Core
Thanks


Reply all
Reply to author
Forward
0 new messages