Brief introduction
The following is used to do automated testing of the app is called favorite Catch doll, will later be renamed NetEase catch doll.
The Appiumier project mentioned below will contain the APK package for testing and the automated test code.
First, a pit.
With the high level of customization of Android, some phones are like this, such as Vivo x9s, you in the process of testing debugging will eventually find that jump to some pages driver but not go to this page, Page_souce can not print, so what elements you can not get. The only solution is to change the phone. Then I changed a ZTE phone, the problem disappeared.
Preparatory work
Here I list a few things to prepare for Appium automated testing under windows with Python3:
1. Everything: Search artifact, such as search for the local uiautomatorviewer.bat file where it is (not necessary);
2. Uiautomatorviewer.bat: Need to download the Android SDK tool, which will contain this thing. Used to locate the elements on the Android page (required);
3. Appium-client: To install the Python library, can be installed through the PIP (required);
4. Node. JS: Search online to install node and NPM under Windows, and then use CMD to verify that the installation was successful (required):
4. Install Appium-server: directly from the Appium official online download on the line, attached:. I ran the test on Windows, so download the exe file directly, run the installation (necessary);
5. Download the Appiumier Project, attached: (My Automated test Code) (required);
6. Install the Nose library: You can see the installation method on the official website, very simple. I was through the Python3 nose test, as to nose is what can look at my previous written about the nose in combat some of the articles, can also search on the Internet a lot (necessary).
Start testing
When you're ready, double-click the Appium shortcut to run Appium-server:
After Appium-server is started, open cmd in the Appiumier project root directory and enter the following command to perform the nose test:
Nosetests-s-v-d--cover-html
After running the test results are as follows:
An HTML file is then generated in the Appiumier root directory, which records the test results.
Windows Python3+nose+appium Automated Testing Android Real-combat chapter