Android automated testing - robotium (seven) Ant build script

  The script of robotium is written in Java and can be built using ant. Of course the build.xml file is different from Selenium WebDriver's build.xml.

Ant:http://luwenjie.blog.51cto.com/925779/831345

 

You can refer to the official robotium Wiki to solve the problem of Robotium coverage:

http://code.google.com/p/robotium/wiki/QuestionsAndAnswers

 

1. For robotium tests we don't have to write build.xml ourselves.

Refer to the command:

android update test-project -m [path to target application] -p [ path to the foler ]

 



  

2. You need to put robotium.jar in the libs directory of the test project, and ant will need to refer to it in the future

 



  

3. Simply use ant to build.

 

The key is: <import file="${sdk.dir}/tools/ant/build.xml" />

The automatically generated build.xml includes the ant build file that comes with android.

This build.xml is recommended to be read in detail, and you can learn a lot.

 



 Because the default start here is help, so when we run ant directly, the help content will be returned


 

 



  

According to the help prompt, running test is to run the test

 



  

Of course, we can change the default to test, so the default running ant is to run the test.

 

 

This article is from the " Xiao Maozi " blog, please be sure to keep this source http://xiaomaozi.blog.51cto.com/925779/932284

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326397356&siteId=291194637