0

Hi, can anyone help me with launching a test script in parallel execution?

How should I configure Desire capabilities and webdriver instance inside a script?

I have appium test script written in Python and unittest.

My grid is up and running but test script is starting only on one device :/ (if I change device name it will start on other device, but how can I start it simultaneously on both devices?)

step 1:

java -jar selenium-server-standalone-3.0.1.jar -role hub -hubConfig C:\selenium\hubconfig.json

step 2:

appium --nodeconfig C:\selenium\nodeconfig1.json -p 4732 -bp 5724

step 3:

appium --nodeconfig C:\selenium\nodeconfig3.json -p 4743 -bp 5744

ad1 - my hubconfig.json:

{
  "host": "127.0.0.1",
  "port": 4444,
  "newSessionWaitTimeout": 1,
  "servlets" : [],
  "prioritizer": null,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "nodePolling": 5000,

  "cleanUpCycle": 5000,
  "timeout": 300000,
  "maxSession": 4
}

ad2 - my nodeconfig1.json:

{
  "capabilities":
      [
        {
          "browserName": "Samsung Galaxy S7",
          "version":"6.0.1",
          "maxInstances": 1,
          "platform":"ANDROID"
        }
      ],
  "configuration":
  {
    "cleanUpCycle":2000,
    "timeout":30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "url":"http://127.0.0.1:4732/wd/hub",
    "host": "127.0.0.1",
    "port": 4732,
    "maxSession": 1,
    "register": true,
    "registerCycle": 5000,
    "hubPort": 4444,
    "hubHost": "127.0.0.1"
  }
}

ad3 - my nodeconfig3.json:

{
  "capabilities":
      [
        {
          "browserName": "QUANTUM_2_400",
          "version":"4.4.2",
          "maxInstances": 1,
          "platform":"ANDROID"
        }
      ],
  "configuration":
  {
    "cleanUpCycle":2000,
    "timeout":30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "url":"http://127.0.0.1:4743/wd/hub",
    "host": "127.0.0.1",
    "port": 4743,
    "maxSession": 1,
    "register": true,
    "registerCycle": 5000,
    "hubPort": 4444,
    "hubHost": "127.0.0.1"
  }
}

And after that my selenium grid is up and running with two appium nodes with both android devices, but what should I include in test script to run it in parallel?

Currently I am trying with something like this:

self.driver = webdriver.Remote(
command_executor="http://localhost:4444/wd/hub",
desired_capabilities={
                "platformName": "ANDROID",
                "platformVersion": "4.4.2",
                "deviceName": "QUANTUM_2_400",
                "app": PATH("...apk"),
                "appPackage": "",
                "appActivity": ""
})

0 Answers0