0

I have a problem with beanshell.I want to create a BeanShell script that allows me to automate a Robotium test.

I have a shell script that works and lets me do whatever I want, but I'm looking Beanshell equivalent:


#!/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

How, through BeanShell, I can run the script pre-made, or when an equivalent result by any other means that you can suggest me.

I am looking for answers for 3 days, and I have nothing conclusive

Thank you in advance for your help.

Marie K.
  • 1
  • 2

1 Answers1

0

Marie,

u can have look into the integrating ur robotium project with jenkins. Its a build deployment tool. It has plugin which allows to control the android testing. Have a look at below links: http://dnlkntt.wordpress.com/2012/08/02/robotium-jenkins-and-ant/

It helped me a lot to automate the test execution process.

mdashu
  • 225
  • 1
  • 6
  • 14