Shiratesã¯ã¤ãã¯ã¹ã¿ã¼ã
æ¬è¨äºã¯ github.com ã®æ¥æ¬èªè¨³ã§ãã
ã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«
åæã¨ãªã以ä¸ã®ãã¼ã«ãã¤ã³ã¹ãã¼ã«ãã¾ãã
注æäºé
ãã¼ã«ãæ£å¸¸ã«åä½ããªãå ´åãããã®ã§ã以ä¸ã®æåãå«ãOSã®ã¢ã«ã¦ã³ãåã¯ä½¿ç¨ããªãã§ãã ããã
- ASCIIæå以å¤ã®æåãå«ããï¼ä¾ï¼ãã¹ã太éï¼
- 空ç½æåãå«ããï¼ä¾ï¼test taro ï¼
IntelliJ IDEA
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ãã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã ãããUltimateã¯æå製åãCommunityã¯ãªã¼ãã³ã½ã¼ã¹è£½åã§ãã https://www.jetbrains.com/idea/
Android Studio
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ãã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã https://developer.android.com/studio
Xcodeï¼macã®ã¿ï¼
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯App Storeã§æ¤ç´¢ãã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
Command Line Tools for Xcodeï¼macã®ã¿ï¼
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¿ã¼ããã«ãéãã¦ä»¥ä¸ã®ã³ãã³ããå®è¡ãã¦ãã ããã
xcode-select --install
Homebrewï¼macã®ã¿ï¼
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´å㯠https://brew.sh/ ãåç §ãã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
Node Package Manager (NPM)
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã ãã§ã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åããã¼ã¸ã§ã³ãå¤ãã¨Appiumãæ£å¸¸ã«åä½ããªãå ´åãããã®ã§ãæ¯è¼çæ°ãããã¼ã¸ã§ã³ã«ã¢ããã°ã¬ã¼ããã¦ãã ããã
macã®å ´å
Homebrewã使ç¨ãã¦ã¤ã³ã¹ãã¼ã«ã§ãã¾ããã¿ã¼ããã«ãéãã¦ä»¥ä¸ã®ã³ãã³ããå®è¡ãã¦ãã ããã ï¼æ°è¦ã¤ã³ã¹ãã¼ã«ã®å ´åï¼
brew install node node -v
ï¼ã¢ããã°ã¬ã¼ãã®å ´åï¼
brew update brew upgrade node
Windowsã®å ´å
ã¤ã³ã¹ãã¼ã«ããã±ã¼ã¸ãå ¥æãã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
https://nodejs.org/en/download/
注æäºé
ã¤ã³ã¹ãã¼ã«ãããã¼ã¸ã§ã³ãå¤ãå ´åã¯Appiumãæ£å¸¸ã«åä½ããªãå ´åãããã®ã§ãæ¯è¼çæ°ãããã¼ã¸ã§ã³ãã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
Appium 2.0
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
ãã§ã«å©ç¨ä¸ã®å ´åã¯ãã¼ã¸ã§ã³ããã§ãã¯ãã¦ãã ããã
appium -v
Appium 1.xãã¤ã³ã¹ãã¼ã«ããã¦ããå ´åã¯ã¢ã³ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
npm uninstall -g appium
Appium 2.0ãnpmã§ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
npm install -g appium@next appium -v
è£è¶³
- Appium 2.0ã¯ãªãªã¼ã¹æºåä¸ã§ãã2.0ãã¤ã³ã¹ãã¼ã«ããã«ã¯"@next"ãæå®ããå¿ è¦ãããã¾ãã
- ãã¹ãæ¸ã¿ã®ç°å¢ãåèã«ãã¦ãã ãã
å®è¡ä¾
appium -v npm uninstall -g appium npm install -g appium@next appium -v
å®è¡çµæ
wave1008@SNB-M1 ~ % appium -v 2.0.0-beta.33 wave1008@SNB-M1 ~ % npm uninstall -g appium removed 437 packages, and audited 1 package in 816ms found 0 vulnerabilities wave1008@SNB-M1 ~ % npm install -g appium@next added 426 packages, and audited 427 packages in 16s 62 packages are looking for funding run `npm fund` for details found 0 vulnerabilities wave1008@SNB-M1 ~ % appium -v 2.0.0-beta.35 wave1008@SNB-M1 ~ %
UIAutomator2 driver
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
appium driver install [email protected]
ãã§ã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã¯åã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
appium driver list appium driver uninstall uiautomator2 appium driver install [email protected] appium driver list
ãã¹ãæ¸ã¿ã®ç°å¢ãåèã«ãã¦ãã ãã
XCUITest driver(macã®ã¿)
ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
appium driver install [email protected]
ãã§ã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã¯åã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
appium driver list appium driver uninstall xcuitest appium driver install [email protected] appium driver list
ãã¹ãæ¸ã¿ã®ç°å¢ãåèã«ãã¦ãã ãã
ç°å¢å¤æ°ï¼macã®å ´åï¼
åæåã¹ã¯ãªããï¼.zshrcãªã©ï¼ã§ç°å¢å¤æ°ãè¨å®ãã¦ãã ããã
è¨å®ä¾
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH
è¨å®å¤æ´ãæå¹ã«ããã«ã¯ãã°ãªããã¦ãããã°ãªã³ãç´ãã¦ãã ããã
ç°å¢å¤æ°ï¼Windowsã®å ´åï¼
- Android Studioãéãã¾ãã
- ã¡ãã¥ã¼ãã Tools > SDK Manager > Appearance & Behavior > System Settings > Android SDKãé¸æãã¾ãã
- Android SDK Locationã®å¤ãã³ãã¼ãã¾ãã
- ã·ã¹ãã ç°å¢å¤æ°ã« ANDROID_SDK_ROOT ãè¨å®ãã¾ããä¸è¨ã§ã³ãã¼ããå¤ãè¨å®ãã¾ãã
- ã·ã¹ãã ç°å¢å¤æ°Pathãç·¨éãã以ä¸ã®ãã¹ãè¨å®ãã¾ãã
%ANDROID_SDK_ROOT%\platform-tools %ANDROID_SDK_ROOT%\tools
6. PCãåèµ·åãã¾ãã
AVD(Android Virtual Device)ã®ã»ããã¢ãã
ãã¢ç¨ã®AVDãä½æãã
- Android Studioãéãã¾ãã
- ã¡ãã¥ã¼ãã
Tools > Device Manager
ãé¸æãã¾ãã Create Device
ãã¯ãªãã¯ãã¾ããPixel 3a
ãé¸æããNext
ãã¯ãªãã¯ãã¾ããS/API Level 31/Android 12.0 (Google Play)
ãé¸æããNext
ãã¯ãªãã¯ãã¾ã (é»åã¢ããªããã¢ã§ä½¿ç¨ããã®ã§Google Play Storeãå¿ è¦ã¨ãªãã¾ã)ã ãªããM1 Macã®å ´å㯠arm64ãããã以å¤ã®å ´åã¯x86_64ãé¸æãã¾ãã- AVDã®ååã
Pixel 3a API 31(Android 12)
ã«è¨å®ãã¦Finish
ãã¯ãªãã¯ãã¾ãã
ãã¢ã³ã¹ãã¬ã¼ã·ã§ã³
ãã¢ãå®è¡ãã¾ããã
è¨èªè¨å®
shirates-coreã«ä»éãã¦ãããã¢ãå®è¡ããéã¯Android OSã®è¨èªãEnglish(United States)
ã«è¨å®ãã¦ãã ããã
shirates-coreããã¸ã§ã¯ããéã
- shirates-coreããã¸ã§ã¯ãã®ãã£ã¬ã¯ããªãFinderã¾ãã¯Exlorerã§éãã¾ãã
- build.gradle.ktsãå³ã¯ãªãã¯ãã¦IntelliJ IDEAã§éãã¾ãã
å³ã¯ãªãã¯ã§ã®ãã¹ãå®è¡ãæå¹ã«ãã
- IntelliJ IDEA > Preferences (ã¾ã㯠File > Settings)ãé¸æãã¾ãã
- Build, Execution, Deployment > Build Tools > Gradleãé¸æãã¾ãã
- Build and run tests usingã IntelliJ IDEAã«è¨å®ãã¾ãã
- Run tests usingãIntelliJ IDEAã«è¨å®ãã¾ãã
AndroidSettingsDemoãå®è¡ãã
- Device Managerãã
Pixel 3a API 31(Android 12)
ã®AVDãèµ·åãã¾ãã - IntelliJã§shirates-coreããã¸ã§ã¯ããéãã
src/test/Kotlin/demo/AndroidSettingsDemo
ãå³ã¯ãªãã¯ãã¦Debug
ãé¸æãã¾ãã
3.以ä¸ã®ãããªãã°ãIntelliJ IDEAã®ã³ã³ã½ã¼ã«ã«åºåããã¾ãã
åºåãããã¬ãã¼ãã確èªãã
- IntelliJ IDEAã®ã³ã³ã½ã¼ã«ã«åºåããããã°ã®ãã¤ãã¼ãªã³ã¯ãã¯ãªãã¯ãã¦ãã°ã®ãã£ã¬ã¯ããªã表示ãã¾ãã
- ãã°ã¨ã¬ãã¼ããã¡ã¤ã«ãåºåããã¦ãããã¨ã確èªã§ãã¾ãã
- _Report(simple).htmlãéãã¾ãããã¹ãã®å®è¡çµæãHTMLã§ç¢ºèªã§ãã¾ããè¡ãã¯ãªãã¯ããã¨å¯¾å¿ããã¹ã¯ãªã¼ã³ã·ã§ããç»åããã¤ã©ã¤ãããã¾ããè¡ãããã«ã¯ãªãã¯ããã¨ã¤ã¡ã¼ã¸ãæ¡å¤§è¡¨ç¤ºããã¾ãã
- _Report(detail).htmlãéãã¾ãããã°ã¿ã¤ããinfoã®æ å ±ã追å ã§åºåããã¦ãããã¨ã確èªã§ãã¾ãã
- [email protected]ãéãã¾ãããã¹ãã®å®è¡çµæã表形å¼ã§ç¢ºèªã§ãã¾ãã
- TestList_androidSettingsConfig.xlsxãéãã¾ããä¸è¦§ã§ãã¹ãçµæã確èªã§ãã¾ãã
CalculatorDemoãå®è¡ãã
- Device Managerãã
Pixel 3a API 31(Android 12)
ã®AVDãèµ·åãã¾ãã - Google Play Storeãéãã
Calculator(Google LLC)
ãã¤ã³ã¹ãã¼ã«ãã¾ãã - IntelliJã§shirates-coreããã¸ã§ã¯ããéãã
src/test/Kotlin/demo/CalculatorDemo
ãå³ã¯ãªãã¯ãã¦Debug
ãé¸æãã¾ãã - é»åã®ãã¹ããå®è¡ããããã¨ã確èªãã¾ãã
iOSSettingsDemoãå®è¡ãã
- Xcodeãéãã¡ãã¥ã¼ããWindow > Devices and Simulatorsãé¸æãã¾ããiPhone 13 iOS 15.5ãåå¨ãããã¨ã確èªãã¾ãã
- IntelliJ IDEAã§shirates-coreããã¸ã§ã¯ããéãã¾ãã
src/test/Kotlin/demo/iOSSettingsDemo
ãå³ã¯ãªãã¯ãã¦Debug
ãé¸æãã¾ãã - iOSè¨å®ç»é¢ã®ãã¹ããå®è¡ããããã¨ã確èªãã¾ãã