Windows Python3+nose+appium Automated Testing Android Real-combat chapter

Source: Internet
Author: User
Tags install node appium

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.