Unii
Unii

Reputation: 1617

Running Android emulator from Jenkins to run Junit test with Robotium

How can I run Android emulator from Jenkins to run my tests? When I write in Execiute Windows bath comand, command to run emulator:

emulator -avd Tester

and run my tests I have this errors:

..>emulator -avd Tester 'emulator' is not recognized as an internal or external command, operable program or batch file.

..>exit 9009 Build step 'Execute Windows batch command' marked build as failure

I set path for Android_SDK, java in Windows path and it works from cmd. What should I do to run emulator?

Upvotes: 3

Views: 3076

Answers (2)

Sterling Diaz
Sterling Diaz

Reputation: 3875

You just need to find where the file "emulator.exe" is located, and then run the command in that location. For example, the most probably is that it is located in C:...android-sdk\tools

so, go to the command promt, type cd C:\android-sdk\tools. Then type the command, and it will work just fine. I hope this is the answer even though it´s late. So, accept the answer.

Upvotes: 0

Christopher Orr
Christopher Orr

Reputation: 111565

You can automate the process with the Android Emulator Plugin for Jenkins.

Upvotes: 4

Related Questions