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
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
BUG: Jenkins - Batch - Emulators
Re: BUG: Jenkins - Batch - Emulators
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.
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.
Shortcuts usually aren't...
-
- Posts: 20
- Joined: Wed Jan 08, 2014 5:15 pm
Re: BUG: Jenkins - Batch - Emulators
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.
I'm changing directory before running the tests.
-
- Posts: 20
- Joined: Wed Jan 08, 2014 5:15 pm
Re: BUG: Jenkins - Batch - Emulators
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
"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
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.
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.
Shortcuts usually aren't...
-
- Posts: 20
- Joined: Wed Jan 08, 2014 5:15 pm
Re: BUG: Jenkins - Batch - Emulators
I tried a fresh install, the same behavior, I'm out of ideas 

Re: BUG: Jenkins - Batch - Emulators
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?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 20
- Joined: Wed Jan 08, 2014 5:15 pm
Re: BUG: Jenkins - Batch - Emulators
Hello,
This is the Jenkins job Thanks,
Darius
This is the Jenkins job Thanks,
Darius
Re: BUG: Jenkins - Batch - Emulators
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.

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 20
- Joined: Wed Jan 08, 2014 5:15 pm
Re: BUG: Jenkins - Batch - Emulators
I tried that, the same 

Re: BUG: Jenkins - Batch - Emulators
And it still works if you run the batch manually (by double clicking the batch file)?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 20
- Joined: Wed Jan 08, 2014 5:15 pm
Re: BUG: Jenkins - Batch - Emulators
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
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