Distributed Testing Using Selenium Grid

The problem
I have successfully implemented the selenium gird to run the parallel tests on mobile devices. However, I am trying to run the distributed tests.

Sample Code

public runner()
{
  @BeforeTest
  public void launchApp()
  {
     // App lanuch code 
  }
  @Test 
  public void firstTest()
  {
     // First test code
  }
  @Test 
  public void secondTest()
  {
     // Second test code
  }
  @Test 
  public void thirdTest()
  {
     // Third test code
  }
  @Test 
  public void fourthTest()
  {
     // Fourth test code
  } 
}

Code result expectations
Suppose, I am having 4 test cases with two connected devices. Then, I want to run 2 tests on one device and remaining 2 tests on another device (The number of tests distribution can be vary on devices). As a end result I should get the result for only four tests with device information.

So, Is distributed testing on mobiles possible using Appium client with Selenium WebDriver ?

Environment

  • Appium version (or git revision) that exhibits the issue: 1.12.1
  • Last Appium version that did not exhibit the issue (if applicable): NA
  • Desktop OS/version used to run Appium: Ubuntu 14.04 LTS
  • Node.js version (unless using Appium.app|exe): 11.13.0
  • Npm or Yarn package manager: 6.7.0
  • Mobile platform/version under test: Device 1 (v 8.0.0) , Device 2 (v 8.0.1)
  • Real device or emulator/simulator: Real Device
  • Appium CLI or Appium.app|exe: Appium CLI

I did a google search for, ‘selenium grid distributed testing’ and this was the first result:

If you don’t want to use Docker, you might try your hand at googling. There seem to be plenty of tutorials on this.

@wreed Thanks for reply. Provided solution is best in case of Web platform automation using selenium. I want a solution for Mobile platform using Appium.

Also, Wanted to know if Appium Client itself provides any solution for distributed testing?

I did a google search on ‘selenium grid distributed testing appium’. The first result is a webinar by Jonathan Lipps, one of the primary developers of appium:

Once again I encourage you to do a search on this. There is plenty of information out there.

@wreed @jlipps @shaileshugile1990 I have bit different scenario - I need to execute a single test case in parallel on iOS and Android devices ? How can we handle this scenario with use of Grid - I am facing the problem during initialization of driver, how can we target the platform specific driver ?