-
Appium 을 이용한 Windows Application 테스트 자동화Appium 테스트 자동화 2020. 6. 14. 13:32
Appium 에서 WinAppDriver(WAD)를 지원하면서 Windows Application UI 테스트도 가능해졌다.
간단하게 환경설정 방법을 소개한다.
Step 1. Node.js 설치
우선, Appium 은 Node.js 기반이기에 Node.js 부터 설치해야한다.
아래 URL 에서 Node.js 를 설치한다.(참고로 LTS는 Long Term Support 의 약자로 일반적인 경우 LTS 버전을 설치하는 것을 추천한다.)
Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
Step 2. Appium 설치
Appium 설치에는 2가지 방법이 있다.
1. *.exe 형태의 Desktop 버전 설치
2. npm (Node Package Manager) 를 이용한 Node.js 패키치로 설치
-> 1번의 경우 opencv4nodejs 연동이 불가하기에 이미지 인식/비교 기능을 사용하고 싶다면, 2번 방식으로 npm 을 이용해서 설치하자.
1번의 경우 아래 링크에서 설치 파일을 다운받을 수 있다.
Appium: Mobile App Automation Made Awesome.
Appium Philosophy Appium is built on the idea that testing native apps shouldn't require including an SDK or recompiling your app. And that you should be able to use your preferred test practices, frameworks, and tools. Appium is an open source project and
appium.io
https://github.com/appium/appium-desktop/releases
appium/appium-desktop
Appium Server and Inspector in Desktop GUIs for Mac, Windows, and Linux - appium/appium-desktop
github.com
2번의 경우
CLI (Command Line Interface / Windows의 경우 명령프롬프트(cmd), Power Shell 등) 에서 아래와 같이 입력한다.
npm은 node.js 설치 시 같이 설치된다.
npm install -global appium
NPM을 통한 Appium 설치 *참고로 -global 의 경우 -g 와 같은 의미이다. global 설치의 경우 npm global 영역에 설치된다.
default 경로는 아래와 같다.
C:\Users\<username>\AppData\Roaming\npm\node_modules
Step 3. Appium 실행
Desktop 버전의 경우 간단하게 Appium.exe 를 실행하고 서버를 실행하면 된다.
npm을 통해 설치한 경우에는
CLI 에서 appium 을 입력하면 된다.
Windows Power Shell 에서 Appium 실행화면 Step 4. Win App Driver 설치
Windows Application 테스트를 위해서는 WinAppDriver(WAD)를 설치해야한다. 아래 링크에서 설치하자.
*참고로 Appium 버전과 WAD 버전 사이 호환성이 존재한다.
Appium 버전 WAD 버전 1.15.1 ~ 1.1 1.17.1 1.2 https://github.com/Microsoft/WinAppDriver/releases
microsoft/WinAppDriver
Windows Application Driver. Contribute to microsoft/WinAppDriver development by creating an account on GitHub.
github.com
Step 5. Windows 개발자 모드 활성화
Windows 설정 -> 업데이트 및 보안 -> 개발자용 -> 개발자 모드를 선택하여 개발자 모드를 활성화 한다.
(*Windows 10 버전별로 명칭이나 경로는 다를 수 있다.)
Step 6. 샘플 테스트 작성
아래 링크에 테스트 샘플이 있다.
https://github.com/microsoft/WinAppDriver/tree/master/Samples
microsoft/WinAppDriver
Windows Application Driver. Contribute to microsoft/WinAppDriver development by creating an account on GitHub.
github.com
Step 7. Automation ID 확인 방법
테스트 자동화 스크립트 작성시 필요한 오브젝트의 Automation ID, Class Name, Name 등은 아래 툴을 사용하여 확인 가능하다.
https://accessibilityinsights.io/
Accessibility Insights
Solve accessibility issues before they reach your customers.
accessibilityinsights.io
'Appium 테스트 자동화' 카테고리의 다른 글
Appium + opencv (opencv4nodejs) 모듈 사용하기 (0) 2020.05.22 Appium + Win App Driver (WAD) SendKeys 사용시 Unknown server-side error 해결방법 (0) 2020.05.17