Robotium source code compilation

Source: Internet
Author: User

Robotium is a recently popular open-source Android automated testing tool. It can be used for both white-box testing and black-box testing. It depends on the needs of your project. The advantage of robotium is that it uses the android instrument automated testing framework for Secondary Development of the kernel, and does not require high or even zero root permissions during the real machine testing process; at the same time, using instrument as the kernel is also a limitation, that is, it cannot be tested across apps. That is to say, each test project you write can only test one app, when this test project has an interface to jump to another app interface (such as the need to share content on Weibo QQ and other platforms), crash will occur. This article focuses on the advantages and disadvantages of this tool. The following describes the source code compilation process of robotium.

1. Download Maven and m2e

Both Maven and ant are a tool for unified deployment, such as large package compilation.

Http://maven.apache.org/download.cgi

The latest version is 3.1.0. After the download is complete, add the maven bin directory to the environment variables and enter the CMD command line and enter MVN to check whether the installation is successful. The following is the interface after my installation is successful.

M2e is the plug-in of Mave on Eclipse. The address for online installation is

Http://download.eclipse.org/technology/m2e/releases/

After the installation is successful, select windows -- preference in eclipse and you will see the maven option, as shown in

2. Download the source code of robotium.

:

Http://download.csdn.net/detail/tianxuexuankui/5822937

3. Compile the robotium source code in eclipse

(1) import the project

Import the source code of robotium to eclipse and select the maven tab during import, as shown in figure

(3) Compile the source code

Right-click the source code project and run as --- Maven install to compile the project. The console output snippet is as follows:

[INFO] Robotium .......................................... SUCCESS [18.201s][INFO] Robotium :: Solo .................................. SUCCESS [20.743s][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 39.245s[INFO] Finished at: Sat Jul 27 08:39:56 CST 2013[INFO] Final Memory: 4M/8M[INFO] ------------------------------------------------------------------------

Indicates that the compilation is successful. A target directory will appear in the source code refresh project, which is the compiled JAR file.

 

 

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.