简体   繁体   中英

Android - “ant test” with subdirectory

I have all of my tests in my test project located in a tests/ directory and everything in this directory is run when I call ant test . The directory has a few subdirectories, such as unit and functional . How can I tell ant test to only run tests in one of these subdirectories and ignore the others?

In my setup i defined a separate Ant target for each type of test, and then made each target conditional on some property.

   <target name="performance" if="test.performance">
   </target>

Then at build time specify the required properties on the ant command line (-Dkey=value). If you have allot of different packages to be tested independently consider defining properties in a properties file which you load in your build file.

let me know if you have any questions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM