Eclipse + Appium Desktop + Andriod SDK + emulator night God automated test environment to build Android

    During this period a lot of time to waste, problems, mostly Baidu see is nonsense to try to solve the problem, and today I share with you my configuration solutions and the environment, the principle thing, is not difficult. Well twists and turns but the process really hard! ! I put my tidy up the configuration process, hope to help you

First, install the JDK, and configure the environment variables

    Link to configure itself according to the following
https://jingyan.baidu.com/article/f96699bb163475894e3c1be4.html

Second, install Android SDK

    1, SDK download at the following address environmental, exe file to download, all the way to the next step, you can choose to install folder
http://tools.android-studio.org/index.php/sdk

Here Insert Picture Description    2, corresponding to various download API and tools, refer to the following articles, all in comparison to say Manager the SDK
https://www.jianshu.com/p/0b9d705fc35f
    . 3, (important) the Eclipse the ADT installation, can be pressed directly into the FIG. Marketplace search adt, click the installation can
Here Insert Picture Description
    also can refer to the diagram method
https://www.cnblogs.com/zzugyl/p/4022703.html

    3, add that, if you select the image still can not update the SDK, then look at the operation step

打开C:\Windows\System32\drivers\etc文件夹下,记事本方式打开hosts文件,在文件最后添加:

#Android update 
203.208.46.146 dl.google.com 

74.125.237.1 www.google.co
74.125.237.1 www.developer.android.com

74.125.237.1 dl-ssl.google.com
#Android update end


保存,再次打开SDK Manager,此时某讯电脑管家可能提醒你“访问谷歌网时跳转到不信的网站”,点击信任即可

Third, the installation Appium Desktop

    1, before installing Appium Desktop, need to configure the JDK, SDK environment

    2, downloading Appium desktop, graphical interface, easy to operate and does not require complex configuration official website to download the following address, if relatively slow speed, you can use 4G hot spot open next
https://github.com/appium/appium- Desktop / Releases
testerhome domestic download site, when I see the version up to 1.8
http://pan.baidu.com/s/1jGvAISu
    3, the download is complete, just click to install, all the way to the next step

Fourth, the installation Yagami simulator

Night Priest network
https://www.yeshen.com/

Five, Appium connection Yagami simulator

    And finally to the main event, all are ready for him, you may occur the following problems:

    Android sdk adb and night in God in nox_adb version is inconsistent,
enter cmd in

 adb connect 127.0.0.1:62001

    It occurs when the following mention Here Insert Picture Description
    this when you go to Baidu, a lot of people will tell you that either you put the SDK adb named: nox_adb replace a god in adb, or make you replace the SDK adb with nox_adb night of God , (but just do not want to use their way) students who are interested, I can refer to the following this blog

https://blog.csdn.net/qq_27009225/article/details/103804556

1, start Appium, program Appium call simulator

(1) Server Click Start
Here Insert Picture Description
(2) Click the button start inspector session

Here Insert Picture Description(3) Set the following parameters


{
  "platformName": "Android",    
  "deviceName": "模拟器ip:端口号(要是真机:设备名或者型号,不需要写端口号)",
  "appPackage": "所要启动APP的包名",
  "appActivity": "所要启动APP的Activity名",
  "platformVersion": "模拟器或者真机的Android版本"
}

Here Insert Picture Description

(4) appPackage "and" appActivity "need to get used aapt, find aapt Android sdk under the build-tools, hit enter in the address bar enter cmd
Here Insert Picture Description
, enter the following command, and then press Enter, copy, you can fill. The resolved within apk files directly dragged into the night God simulator, you can install

aapt dump badging “所要启动APP的路径”
aapt dump badging G:\Software\BaiduMaps.apk

Here Insert Picture Description
Here Insert Picture Description

(5) Click Start Session, a successful startup
Here Insert Picture Description
might be prompted

Original error: Could not sign with default certificate. 
Original error Command ''C:\Program Files (x86)\Java\jdk1.8.0_45\bin\java.exe' -jar '
C:\Program Files (x86)\Appium\resources\app\node_modules\appium-adb\jars\sign.jar' '
C:\Program Files (x86)\Appium\resources\app\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
' --override' exited with code 1

At this point only need to run as administrator

Published 59 original articles · won praise 6 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_27009225/article/details/103802766