Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
Running prallel tests with Selenium grid in Android?

Solved 1 Answers 98 Views
0 1
Hi, i am successfully executing test scripts with appium. But i want to execute the same test scripts on multiple devices for that i used selenium grid. But at a time only 1 device executing.

Can you please briefly explain me or suggest me.

Thanks in advance.

1 Answer

0
Best answer
0
You may need to make changes to your TestNG file and make tests execute in parallel. Can you post your TestNG xml file?

 

Let me know.
answered by
5Comments
commented by
I am running it with JUnit..Instead of TestNG.. can't we do with TestNG ?
commented by
You can do it with TestNG, you will have to convert your JUnit tests into TestNG. In case of JUnit, you can use only one device at a time. Unless you are using tools like Jenkins, Maven or Ant.
commented by
Can you please provide some sample links to getting started with TestNG for parallel tests using Selenium grid. Actually i am new to this test automation. Thanks in advance.
commented by
here is my TestNG.xml file..please let me know if anything went wrong.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default suite" thread-count="4" parallel="tests">
  <test name="Nexus" >
  <Parameters>
      <parameter name="platform" value="Nexus"></parameter>
      <parameter name="browsername" value="Android"></parameter>
      <parameter name="remoteurl" value="http://0.0.0.0:4723/wd/hub"></parameter>
  </Parameters>
  <classes>
      <class name="AppiumTest">
          <methods>
              <include name="Test1"></include>
              <include name="Test2"></include>
              <include name="Test3"></include>
         </methods>
      </class>
  </classes>
  </test>
<test  name="Moto E" >
  <Parameters>
      <parameter name="platform" value="Moto E"></parameter>
      <parameter name="browsername" value="Android"></parameter>
      <parameter name="remoteurl" value="http://0.0.0.0:4726/wd/hub"></parameter>
  </Parameters>
  <classes>
      <class name="AppiumTest">
          <methods>
              <include name="Test1"></include>
              <include name="Test2"></include>
              <include name="Test3"></include>
         </methods>
      </class>
  </classes>
  </test>
  </suite>
commented by
Things are looking good. Have you setup android server. Also if you have grid setup on local computer, your server address should be "localhost" or "127.0.0.1" and not "0.0.0.0"

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...