From: Pu G. <pu...@gm...> - 2011-10-09 05:25:40
|
Hi guys, I am trying to get the coverage number of my Android project tests. I did the following things to make the instrumented class can run on Android without any Java exception, but I couldn't get the cobertura.ser file. Anyone can tell me how to make Cobertura support Android. 1. Set the data file output path in run time by calling the System.setProperty. 2. Instrument all .class file of the Android apk project 3. Package all .class, coberatura.jar and all dependent jars. log4j.jar is replaced by slf4j. 4. Install the apk. 5. Install the test apk and run. Since on Android an application doesn't quit by user pressing Back/Home button, I use the test apk to make the app quit. The system will exit the app process after the junit tests finish. After I run the junit test, I didn't get any data file (.ser file). Thanks a lot. -G.P |