Appium running multiple devices at the same time

Source: Internet
Author: User

To improve test efficiency, testing needs to run on multiple Android devices at the same time, requiring multiple appium to be started.

When you start Appium, set a different port number for each device, and set the Udid for the device for driver. See the following example, the key is the red part

Desiredcapabilities capabilities = new Desiredcapabilities ();
Capabilities.setcapability (Capabilitytype.browser_name, "");
Capabilities.setcapability ("DeviceName", "minote");
capabilities.setcapability ("Udid", "aqprbmwgjn45cmr8");
Set each run without restarting the tested app
Capabilities.setcapability ("NoReset", "true");
Capabilities.setcapability ("Fullreset", "false");
Setting up the Android system version
Capabilities.setcapability ("Platformversion", "4.4");
Capabilities.setcapability ("PlatformName", "Android");
Capabilities.setcapability ("Device", "selendroid");
Capabilities.setcapability ("App", App.getabsolutepath ());
String ABC = App.getabsolutepath ();
Set the app's main package name and main class name package name and activity name
Capabilities.setcapability ("Apppackage", "com.tencent.mm");
Capabilities.setcapability ("Appactivity", "Com.tencent.mm.ui.LauncherUI");
Start
try {
Driver = new Androiddriver (The new URL ("http://127.0.0.1:4725/wd/hub "), capabilities);
} catch (Malformedurlexception E1) {
TODO auto-generated Catch block
E1.printstacktrace ();
}

Appium running multiple devices at the same time

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.