Appium 在酱油实验室进行移动测试的先决条件是什么?

Appium 在酱油实验室进行移动测试的先决条件是什么?,appium,Appium,我是阿皮姆的新手。我想在sauce labs上使用appium工具在android和iOS应用程序上执行移动测试 I want to know what are the pre-requisites, and how to write the scripts(in java) and how exactly the flow goes. can anybody help me out?? Thanks a lot in advance.. :-) 包com.saucelabs impo

我是阿皮姆的新手。我想在sauce labs上使用appium工具在android和iOS应用程序上执行移动测试

I want to know what are the pre-requisites, and how to write the scripts(in java) and how exactly the flow goes.

can anybody help me out??

Thanks a lot in advance.. :-)  
包com.saucelabs

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.net.URL;

import static junit.framework.Assert.assertEquals;
/**
 * Simple {@link RemoteWebDriver} test that demonstrates how to run your Selenium tests with <a href="http://ondemand.saucelabs.com/ondemand">Sauce OnDemand</a>.
 * *
 * @author Ross Rowe
 */
public class DemoScript {

    private WebDriver driver;

    @Before
    public void setUp() throws Exception {
        DesiredCapabilities caps = DesiredCapabilities.android();

        caps.setCapability("browserName", "");

        caps.setCapability("platformVersion", "4.4");
        caps.setCapability("appiumVersion", "");
        caps.setCapability("platformName", "Android");
        caps.setCapability("deviceName", "Android Emulator");
        caps.setCapability("device-orientation", "portrait");



       /* DesiredCapabilities capabillities = DesiredCapabilities.iphone();
        capabillities.setCapability("version", "5.0");
        capabillities.setCapability("platform", Platform.MAC);*/
        this.driver = new RemoteWebDriver(
                      new URL("http://**********************"),caps);
    }

    @Test
    public void basic() throws Exception {
        driver.get("http://www.amazon.com/");
        assertEquals("Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more", driver.getTitle());
    }

    @After
    public void tearDown() throws Exception {
        driver.quit();
    }

}

i am new to Appium. I want to perform mobile testing on android and i OS app using appium tool on sauce labs.

I want to know what are the pre-requisites, and how to write the scripts(in java) and how exactly the flow goes.

can anybody help me out??

Thanks a lot in advance.. :-)
import org.junit.After;
导入org.junit.Before;
导入org.junit.Rule;
导入org.junit.Test;
导入org.junit.rules.TestName;
导入org.openqa.selenium.Platform;
导入org.openqa.selenium.WebDriver;
导入org.openqa.selenium.remote.DesiredCapabilities;
导入org.openqa.selenium.remote.RemoteWebDriver;
导入java.net.URL;
导入静态junit.framework.Assert.assertEquals;
/**
*简单的{@link RemoteWebDriver}测试,演示如何使用运行Selenium测试。
* *
*@作者罗斯·罗
*/
公共类演示脚本{
私有网络驱动程序;
@以前
public void setUp()引发异常{
DesiredCapabilities=DesiredCapabilities.android();
caps.setCapability(“浏览器名”、“浏览器名”);
caps.setCapability(“平台版”、“4.4”);
caps.setCapability(“appiumVersion”,即“);
caps.setCapability(“平台名”、“安卓”);
caps.setCapability(“deviceName”、“Android Emulator”);
caps.设置能力(“设备方向”、“纵向”);
/*DesiredCapabilities=DesiredCapabilities.iphone();
能力。设置能力(“5.0版”);
能力。设置能力(“平台”,platform.MAC)*/
this.driver=新的RemoteWebDriver(
新的URL(“http://*******************”,大写);
}
@试验
public void basic()引发异常{
驱动程序。获取(“http://www.amazon.com/");
assertEquals(“Amazon.com:电子产品、服装、电脑、书籍、DVD等的在线购物”,driver.getTitle());
}
@之后
public void tearDown()引发异常{
driver.quit();
}
}
我是阿皮姆的新手。我想在sauce labs上使用appium工具在android和iOS应用程序上执行移动测试。
我想知道先决条件是什么,以及如何编写脚本(用java编写)以及流程是如何进行的。
有人能帮我吗??
事先非常感谢…-)
代码中是否需要任何更改


是否应在运行脚本之前启动appium server?

您没有提到您遇到的错误/问题??在执行上述代码时,它会引发“UnreachableBrowserException”无法启动新会话。可能的原因是远程服务器的地址无效或浏览器启动失败。要连接到appium服务器,我是否必须对代码进行一些更改?如果是,我是否可以获得相同的示例代码?是否在运行代码之前启动appium?您是否使用默认的android emulator或任何其他硬件设备?是的,在运行代码之前,我正在启动服务器。但我试图在sauce实验室上运行代码,而不是在任何真正的设备或模拟器上。