Android Wireless test-uiautomator compile and run test code

Source: Internet
Author: User

First, create a build file

Android Create Uitest-project-n <jars>-T 1-p <workspace path>

Where-n followed by the name of the jar to be released,-T followed by the version of the SDK you need to compile in your PC's number, can be viewed through the Android list,-P followed by your test project workspace path.

Second, modify the build file

Refresh eclipse, found that there are three more files, one of which is build.xml, double hit open build.xml file, the second line of default= "Help" modified to default= "build"

Third, compile

Ant-buildfile <build.xml file Full path >

After the package is compiled, a jar package is generated underneath the bin in the Java project directory

D. Push the build release jar package to the mobile/data/local/tmp/directory

ADB push <path_to_output_jar>/data/local/tmp/

Five, run the test

adb shell Uiautomator runtest <jars>-C < package name >.< class name >[#test name]

  

Android Wireless test-uiautomator compile and run test code

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.