Hi,
I’m trying to set up a project to use Selenium grid 4.4. with Appium, using Cucumber and TestNG.
What I have by now is a runner class:
@CucumberOptions(
features = {"src/test/resources/test_cases/"},
glue = {"cucumber.steps", "cucumber.step_definition"},
plugin = {"pretty", "html:target/cucumber-report.html", "json:target/cucumber-report/report.json"})
public class CucumberLocalTestRunnerTest extends AbstractTestNGCucumberTests {
@Override
@DataProvider(parallel = true)
public Object[][] scenarios() {
return super.scenarios();
}
}
And in the src/test/resources/test_cases/ there are two test cases.
I started selenium grid in standalone mode with Config.toml to set up the relay that communicates with Appium:
[server]
port = 5555
[node]
detect-drivers = false
max-session = 2
[relay]
# Default Appium server endpoint
url = "http://localhost:4723/wd/hub"
status-endpoint = "/status"
# Stereotypes supported by the service
configs = [
"1", "{\"browserName\": \"iPhone 12 Pro\",\"platformName\": \"ios\", \"appium:platformVersion\": \"15.0\", \"appium:udid\": \"7772811E-E56D-4AA5-98A0-2F6E453F6206\"}",
"1", "{\"browserName\": \"iPhone 12 Pro\",\"platformName\": \"ios\", \"appium:platformVersion\": \"15.0\", \"appium:udid\": \"C2C77106-DA40-4BAE-B9C0-EB5EE62F5654\"}"
]
#https://www.toml-lint.com/
And Gradle task as:
task testNGTestTask(type: Test){
useTestNG()
jvmArgs(["-Ddataproviderthreadcount=${threads}"])
scanForTestClasses = false
testLogging.showStandardStreams = true
systemProperties System.getProperties()
systemProperty "cucumber.options", System.getProperty("cucumber.options")
systemProperty "isIOS", System.getProperty("isIOS", "true")
filter {
includeTestsMatching 'cucumber.runners.CucumberLocalTestRunnerTest'
}
When I start the task with 2 threads, both test cases are run in parallel. Both of them have the same desired capabilities to use iPhone 12 Pro with OS 15.0.
What I don’t understand is why are both of them run on the same device and not using separate simulator devices?
I made sure to have created 2 iPhone 12 Pro simulators with the same OS version.
What am I missing here?