Android测试使用与BeanShell一起启动的robotium



我对豆壳有一个问题。我想创建一个BeanShell脚本,它允许我自动执行Robotium测试。

我有一个shell脚本工作,让我做任何我想做的,但我正在寻找等效的Beanshell:


#!/bin/bash
echo "on lance l'AVD"
emulator -avd test &
echo "wait the end of launch"
sleep 15
echo "Installation of the application under test"
adb install -r /home/marie/workspace/AndroidCalculator/bin/AndroidCalculator.apk
echo "Installation of the test application"
adb install -r /home/marie/workspace/TestProject/bin/TestProject.apk
echo "Launch of test"
adb shell am instrument -w com.calculator.test/com.neenbedankt.android.test.InstrumentationTestRunner
echo "Saving file results"
adb pull data/data/com.calculator/files/TEST-all.xml ./resultats.xml
echo "killing the AVD"
adb emu kill

如何,通过BeanShell,我可以运行预先制作的脚本,或者当一个等效的结果通过任何其他方式,你可以建议我。

3天来我一直在寻找答案,但我没有任何结论

提前感谢您的帮助

玛丽,

你可以看看整合我们的robotium项目与詹金斯。它是一个构建部署工具。它有插件,允许控制android测试。看看下面的链接:http://dnlkntt.wordpress.com/2012/08/02/robotium-jenkins-and-ant/

它对我自动化测试执行过程帮助很大。

最新更新