1
有誰知道如何使用Eclipse在Windows上運行Appium Testcase。Android測試用例與Appium
我的問題是。我怎樣才能運行我的Android設備上已經安裝的.apk的測試用例。
因爲我正在使用的示例,它會在每次運行測試用例時安裝apk。
@Before
public void setUp() throws Exception {
File appDir = new File("src/Test");
File app = new File(appDir, "MyTest.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, ""); //Name of mobile web browser to automate. Should be an empty string if automating an app instead.
capabilities.setCapability(MobileCapabilityType.VERSION, "4.4");
capabilities.setCapability(MobileCapabilityType.PLATFORM, "Android");
capabilities.setCapability("app-package", "com.TuneBox.Rokki");
capabilities.setCapability("app-activity", ".MyTest");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}