2017-12-21 36 views
0

Amazon Web Services Device Farm에서 하이브리드 응용 프로그램을 테스트하려고합니다. 그것은 충돌합니다. 하이브리드 앱에 대한 Appium 테스트가 AWS Device Farm에서 작동합니까? 그들은 일한다고하지만 ... 그들은 항상 일합니까?Amazon Web Service Appium 테스트에서 하이브리드 응용 프로그램이 충돌 함

AWS chromedriver와 device chrome 버전 간의 충돌이 크래시와 관련이 있다고 생각합니다.하지만 맞다면 단서가 없습니다.

하이브리드 응용 프로그램에서 Appium Capability 또는 webview 오류를 수정하는 것이 있는지 알고 싶습니다. 비슷한 예를 찾을 수 없습니다.

이 오류 테스트 충돌 :

Device01:16.640 9187 Error WebViewFactory Chromium WebView package does not exist 

내가 간단한 생성 "안녕 세상"이 방법 APK :

cordova create holamundo com.hola.mundo holamundo 
cd holamundo/ 
cordova platform add android 
cordova run android 
을 나는이 메시지를 찾을 수 있습니다 로그에서

test failed: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: Error executing adbExec. 
Original error: 'Command '/opt/dev/android-sdk-linux/platform-tools/adb -P 5037 -s FA75W0301076 shell am start -W -n com.hola.mundo/.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' timed out after 20000ms'; Stderr: ''; Code: 'null' (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 100.72 seconds Build info: version: '2.46.0', revision: 
'61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50' System info: host: 'ip-172-31-13-65', ip: '172.31.13.65', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-53-generic', java.version: '1.8.0_131' Driver info: io.appium.java_client.android.AndroidDriver 

Java Appium 테스트입니다. 내 장치에서 로컬로 작동합니다. 이 테스트는 코드바 앱에서 기본 div 텍스트를 읽는 것입니다. MacOS High Sierra에 Appium 버전 1.7.1 및 cordova 버전 7.1.0이 있습니다. 이것은 시험입니다.

public class LoginPage extends BasePage { 
    public LoginPage loginPage() throws InterruptedException { 
     try { 
      Set<String> contextNames = webdriver.getContextHandles(); 
      System.out.println(contextNames); 
      webdriver.context(AndroidSetup.Contexts.WEBVIEW); 
      WebElement loginButton = webdriver.findElement(By.id("deviceready")); 
      System.out.println("button text: " + loginButton.getText()); 
      takeScreenshot("", "pantallazo.png"); 
      Assert.assertEquals(loginButton.getText(), "DEVICE IS READY"); 
     }catch (Exception ex){ 
      ex.printStackTrace(); 
     } 
     return new LoginPage(driver); 
    } 

    public void takeScreenshot(String path_screenshot, String filename) throws IOException { 
     String currentContext = webdriver.getContext(); 
     System.out.println("current context: " + currentContext + " switching to " + AndroidSetup.Contexts.NATIVE); 
     webdriver.context(AndroidSetup.Contexts.NATIVE); 
     File srcFile=webdriver.getScreenshotAs(OutputType.FILE); 
     File targetFile=new File(path_screenshot + filename); 
     FileUtils.copyFile(srcFile,targetFile); 
     webdriver.context(currentContext); 
     System.out.println("current context: " + webdriver.getContext()); 
    } 
} 

나는 구글 픽셀, 삼성 갤럭시 S8과 LG 전자 LG의 V20에, 포장 및 아마존 웹 서비스 장치 농장에서이 같은 테스트를 실행했다. 이 테스트는 LG에서 작동하며 Google Pixel 및 Samsung 전화에서 작동하지 않습니다.

편집 : 바로 AWS Device Farm에서 Appium 버전을 선택할 수있는 메뉴입니다. 세 가지 버전 모두에서 오류가 발생합니다.

Appium version selection

답변

0

AWS 장치 팜 Appium 서버 1.6.3, 1.6.51.4.16을 지원한다. 1.6.5에 로컬로 다운 그레이드를하고 여전히 있는지 : 그것은 appium 서버 1.7.1 (즉, 최근 chromedriver 버전이) 로컬로 당신을 위해 작동하는 경우

그래서, 는 클라우드에서 오래된 것들에서 작동한다는 보장 없다 그 오래된 크롬 운전사와 함께 작동합니다.

AWS 장치 농장은 코드에서 설정 한 기능을 무시, 그래서에서 설치 프로그램을 실행하는 동안 AWS UI에 아무것도 존재하지 않는 경우 => 이진

+0

chromedriver 사용자 정의를 사용하는 당신이 chromedriverExecutable 같은 기능을 설정할 수있는 방법이 없습니다 안녕하세요 , @dmle, 당신은 Appium 버전 1.6.3, 1.6.5 및 1.7.1 사이에서 선택할 수있는 테스트를 만들 때. 그것은 그들 중 어떤 것에도 작동하지 않습니다. 장치에 따라 다르며 Appium 버전이 아닙니다. – santi