Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
304 views
by
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 like 0 dislike
by
 
Best answer
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.
by
I am running it with JUnit..Instead of TestNG.. can't we do with TestNG ?
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.
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.
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>
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"


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...