My tests are running sequentially but not parallely when I try running on LambdaTest Selenium Grid. Below is a small part of my maven pom file:
<executions>
<execution>
<id>test-chrome</id>
<phase>test</phase>
<configuration>
<env>chrome</env>
<inParallel>true</inParallel>
<nodes>4</nodes>
<specsDir>specs</specsDir>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
<execution>
<id>test-firefox</id>
<phase>test</phase>
<configuration>
<env>firefox</env>
<inParallel>true</inParallel>
<nodes>4</nodes>
<specsDir>specs</specsDir>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
And I have created 2 different directory for chrome and firefox which contains a two different properties file:
chrome.properties file:
BROWSER = chrome
BROWSER_VERSION = 78
PLATFORM = WIN10
firefox.properties file:
BROWSER = firefox
BROWSER_VERSION = 69
PLATFORM = WIN8
I have using these environment variable in my java class file:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserName", System.getenv("BROWSER"));
capabilities.setCapability("version", System.getenv("BROWSER_VERSION"));
capabilities.setCapability("platform", System.getenv("PLATFORM"));
Any help would be appreciated, many thanks :)
Try to replace chrome.properties with this:
And add driver version from the properties files or any other parameter you want to make dynamic