Page 1 of 1

BUG: Jenkins - Batch - Emulators

Posted: Fri Feb 21, 2014 12:15 pm
by darius.popa
Hello,

I have a problem. I am using Jenkins and I am running the tests using a batch file. From Jenkins it trows the following error
error.png
When I am running manually (double click on batch file), using exactly the same files, the tests are running successfully.
I'm using Ranorex 4.1.4 with Windows 7 64 Bit

Thank you,

Darius

Re: BUG: Jenkins - Batch - Emulators

Posted: Fri Feb 21, 2014 2:26 pm
by krstcs
When you run the batch file manually, are you running it from withing the folder where your test's EXE is?

If so, your problem is probably that Jenkins is not in the correct working directory when it starts the batch file. In Jenkins (or the batch file) add a "cd \<Directory where your test resides>" before you run the batch/test.

Re: BUG: Jenkins - Batch - Emulators

Posted: Fri Feb 21, 2014 2:30 pm
by darius.popa
No, the batch files are on the Desktop and the exe file is where Ranorex generates it.
I'm changing directory before running the tests.

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 2:57 pm
by darius.popa
Also, when I try to instrument apk file from Jenkins (batch plugin), I receive this error
"Cannot continue because no Java Runtime Environment (JRE 1.6) is configured. Please install Java 1.6 and start the Ranorex InstrumentationWizard to see if the runtime can be detected/configured."

As far as I see, Jenkins does not recognize local Ranorex installation.
I mention that running manually (double click on batch file) exactly the same commands (copy - paste into a batch file) the tests are running successfully.

Thank you,
Darius

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 3:04 pm
by krstcs
This isn't a Jenkins issue, it's a Ranorex issue. Jenkins has no knowledge of Ranorex and the Instrumentation Wizard. That error is from Ranorex's run-time system.

I would suggest you uninstall Ranorex from the system and re-install it. See if that helps. It appears that it didn't get all of its hooks into the system the first time. (You could try using the instrumentation wizard to just install the Java plugin as well, but I would recommend a clean re-install first.)

Make sure all needed versions of Java are installed first.

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 3:22 pm
by darius.popa
I tried a fresh install, the same behavior, I'm out of ideas :(

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 3:28 pm
by odklizec
It definitely sounds like incorrect working directory issue? Could you please show us the command line you use for starting the test from Jenkins (screenshot from Jenkins job). And how/where you change the directory before running the test command line?

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 4:06 pm
by darius.popa
Hello,

This is the Jenkins job
jenkins job.png
Thanks,
Darius

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 4:51 pm
by odklizec
It looks OK to me, but I'm not so experienced with Android instrumentation and testing ;)

OK, you mentioned the test starts OK if started from the batch file? So what about replacing whole Jenkins batch with simple call of the bat file? Just to try what will happen.

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 5:09 pm
by darius.popa
I tried that, the same :(

Re: BUG: Jenkins - Batch - Emulators

Posted: Mon Feb 24, 2014 6:01 pm
by odklizec
And it still works if you run the batch manually (by double clicking the batch file)?

Re: BUG: Jenkins - Batch - Emulators

Posted: Tue Feb 25, 2014 8:44 am
by darius.popa
Yes

Re: BUG: Jenkins - Batch - Emulators

Posted: Thu Feb 27, 2014 9:53 am
by darius.popa
Did someone have any ideas on this?
Currently I am using a workaround. I created a test suite which clicks on the batch files and it's working fine. So, the problems appears when the Android is used.

Thank you,
Darius