robotium for emma

使用robotium自带例子“NotePad”,将测试工程robotium.jar包放在新建的libs文件夹中

然后就是下面这三步,执行完后在测试工程\bin\_files”下查找代码覆盖率的统计文件。

1、从eclipse的andriod工程里生成一个ant的build文件,andriod-app就是工程名:

android update project -p android-app

2、将eclipse的andriod测试工程也转换成ant工程,-m选项指定了测试工程对应的主andriod工程的位置,而android-test就是测试工程名:

android update test-project -m ../android-app -p android-test

3、执行下面的命令,编译、执行单元测试、收集覆盖率:

ant clean emma debug install test


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章