https://www.cnblogs.com/softerware/p/10875664.html
Environment preparation and necessary plug-in installation
1 pc The physical machine
1.1. python3
For detailed steps, please refer to the rookie tutorial https://www.runoob.com/python3/python3-install.html
① from python Download from the official website python3 Installation package , Version number selection 3.7.7 Or more
② install
③ Configure environment variables
④ Install the necessary plug-ins pytest、pytest-html、Appium-Python-Client
open cmd Command line tools
Input execution separately “pip install pytest”、 “pip install pytest-html” “pip install Appium-Python-Client”
1.2. jdk + Android sdk
Please refer to https://www.cnblogs.com/qican/p/11077107.html
① download jdk Installation package , The version number is 1.8.0
Download address :https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Platform selection Windows x86/Windows x64
② install jdk
③ To configure jdk environment variable
④ Download Android sdk Installation package ( Need to climb over the wall )
Download address :https://developer.android.com/studio/index.html
⑤ Configure environment variables
1.3. appium-desktop
① Download installation package
Download address : Appium-windows-1.15.0.exe
1.4. PyCharm
Download address ( Community Edition , Without registration )
http://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows
2 pc virtual machine
2.1. python3
Application market download and installation python3, The version number is 3.7.5, The default installation path is C:\ThsSoftware\Python_ths
After the installation is successful, open cmd Command line tools
Input execution separately “pip install pytest”、 “pip install pytest-html” “pip install Appium-Python-Client”
2.2. PyCharm
Open the application market of desktop ,“ development tool ” Under Options , choice PyCharm The professional version can be installed
PyCharm The default is built-in virtual environment , So it leads to PyCharm Internal python The plug-in is independent of the system environment .
In order to reduce the repeated installation of plug-ins , You need to manually switch to the system environment .
① open PyCharm Of File menu , Click on Settings Options
② Click on project Of the major events project interpreter Small term
③ Click the secondary menu of the right gear Add
④ Select the third item on the left “System Interpreter”, Choose... On the right “C:\ThsSoftware\Python_ths\python.exe”, Then make sure all the way
2.3. sdk
① download http://172.19.81.132/download/Sdk.zip
② decompression sdk.zip file
③ Add environment variables
1) open “ Start ” menu , Click on the user's avatar
2) Click on the left side of the “ Change my environment variables ”
3) Find... In the user variables in the upper half “Path” And select , Click the edit button
4) In the pop-up box “ A variable's value ” In the bar , take “ decompression sdk The path of \platform-tools” Append to variable value , Separated from the previous value by a semicolon
2.4. jdk
Application market installation and download , Version selection JDK7
2.5. Appium-desktop
① Download installation package
Download address : Appium-windows-1.15.0.exe
② install
③ Edit the configuration
appium After installation , function . Click... On the startup interface “ Edit the configuration ”, Fill in the extracted file sdk Folder path and jdk Installation path for , Save and restart
2.6 Real connection
④ Open the command line tool , Input “adb connect 10.10.25.153:31454”, It can be completed under normal circumstances adb Remote connection , The connection address can be found on the cloud real machine platform .
If you are prompted failed, Please check your cell phone adb Authorization pop-up status
perform “adb kill-server” retry
3 mac
Please refer to the following document
http://172.20.200.191:8003/pages/viewpage.action?pageId=354058459
Naming style
report_center
、index_page.py
、index_btn
HomePage
File hierarchy
page Catalog
cases Catalog
.py
Don't prevent too many files case, Split according to its function .test_*.py
test_*
skip
label .dependency
label .common Catalog
conftest.py
pytest Default configuration file , Inject machine connection test logic here
1、 Test account problem .
Test premise : The backstage has not passed the audit
Test premise : The background has been approved
Test data : Test premise : Not that year, not that day
Test data : Test premise : There is no official account information submitted by users in the background
expect : Automatic approval passed , There is no need for the operation to pass the manual review again
【 Solution 】 Multiple accounts keep their respective status for verification ., Switch account verification .
2、 The refresh check interval is too short , Verification failed
expect :1、 Show Chrysanthemum 2、 written words : Loading (ios)
【 Solution 】 This test case uses weak verification , Catch an exception where a transient element cannot be found , Continue the verification in the following steps .
3、 Font color verification problem
expect : The title of the article is in black
expect : The title of the article turns grey
【 Solution 】 Add pixel comparison and picture comparison functions ,TODO
4、 Gesture drag
Gesture drag the right side of the column to sort , Drag official account information tab To essence Research Report tab below
【 Solution 】 Encapsulate a drag and drop method support ,TODO
5、 data verification expect : And PC Agreement ( Not likely )
【 Solution 】 Realize data consistency verification through interface test .