unit testing - How to run unittests of an android lib using ant? -


i have android lib project, , android test project i've built in eclipse.

now i'm automating process , encounterred problem when trying run tests using ant.

when run "run-tests" target of test project, claims lib project not have "install target".

c:\code4\main\androidmyapplibtest>ant run-tests buildfile: c:\code4\main\androidmyapplibtest\build.xml     [setup] android sdk tools revision 11     [setup] project target: android 2.3.3     [setup] api level: 10     [setup]     [setup] ------------------     [setup] resolving library dependencies:     [setup] c:\code4\main\androidmyapplibtest: ../androidmyapplib => c:\code4\main\androidmyapplib     [setup] c:\code4\main\androidmyapplibtest: ../androidmyappmockslib => c:\code4\main\androidmyappmockslib     [setup] c:\code4\main\androidmyappmockslib: ../androidmyapplib => c:\code4\main\androidmyapplib     [setup] ------------------     [setup] ordered libraries:     [setup] c:\code4\main\androidmyappmockslib     [setup] c:\code4\main\androidmyapplib     [setup] ------------------     [setup]     [setup]     [setup] importing rules file: tools\ant\test_rules.xml  -install-tested-project:     [setup] android sdk tools revision 11     [setup] project target: android 2.3.3     [setup] api level: 10     [setup] project type: android library     [setup]     [setup] ------------------     [setup] resolving library dependencies:     [setup] no library dependencies.     [setup]     [setup] ------------------     [setup]     [setup] warning: no minsdkversion value set. application install on android versions.     [setup]     [setup] importing rules file: tools\ant\lib_rules.xml duplicated project name in import. project android_rules defined first in c:\eclipse\android-sdk_r11-windows\android-sdk-windows\tools\ant\main_rules.xml , again in c:\eclipse\android-sdk_r11-windows\android-sdk-windows\tools\ant\lib_rules.xml  build failed c:\eclipse\android-sdk_r11-windows\android-sdk-windows\tools\ant\test_rules.xml:51: following error occurred while executing line: target "install" not exist in project "androidmyapplib". 

i didn't expect lib installed, (it's lib not apk) android_rules tries intall , fails.

do need configure special test targets test libs , not apps?

thanks!

there's description of how achieve here:

http://www.paulbutcher.com/2010/09/android-library-project-with-tests-step-by-step/


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -