1. Start the test machine or Android emulator (Genymotion is commonly known as the fastest emulator in the world, you can install it on Baidu)
2. Start Appium (Appium environment installation can be done by Baidu yourself)
3. Install the application on Genymotion. As shown below, I installed a small computer application with the package name CalcTest.apk.
Installation steps: (Environment variables have been configured based on the Android SDK, you can use Baidu)
1. Win + R
2. CMD
3. adb devices -- check the operation and list the existing setting names
4. adb install F:\Appium\ CalcTest.apk -- Officially install the App
Test apk download address: https://files.cnblogs.com/files/yyym/CalcTest.apk
As shown below: 192.168.229.101:5555 is the Genymotion virtual machine I just started
4. After the installation is successful, return to Genymotiong and you will see that the installation has been successful.
Open the app and you'll see it's actually a simple calculator
5. Open Eclipse to create a Maven project and use the uiautomatorviewer tool (included in the Android SDK toolkit) to perform basic element positioning operations. The element positioning method has been explained in detail before.
1. Open the Android SDK and you can find the path: android-sdks\tools as follows (get the App package name and decompile it: aapt dump badging apk path)
2. Open uiautomatorviewr.bat
3. Write the basic code as follows for reference only:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
6. Use TestNG to write formal test cases and start executing the test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
[Full 200 episodes] A collection of super detailed advanced tutorials on automated testing of Python interfaces, truly simulating the actual combat of enterprise projects.