Execution of test fails with Runtime or .exe

Ask general questions here.
Danscorpio13
Posts: 21
Joined: Wed Nov 04, 2015 11:12 am

Execution of test fails with Runtime or .exe

Post by Danscorpio13 » Fri Apr 29, 2016 2:45 pm

Hi

1.Our test runs are working fine with Ranorex studio but when I run in Runtime Runner or .exe file on the development machine or virtual machine set-up for test it doesn't click on certain buttons.
I have checked the GDI and resolution settings but all seems to be fine . Not sure what im missing .

2.Also trying to run test on virtual machine with Jenkins CI which also fails to run the test. Understand that Ranorex needs UI to run the test so I have followed the method below but wast successful.
Is there a simple way to unlock a vm in cloud before running the test.

(a.utologon.exe <user> <domain> <password>
REM Here to make sure the logonCount is properly generated
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0xFFFF /f

b.start /min java -jar I:\CDC\jenkins\swarm-client-1.9-jar-with-dependencies.jar -executors 1 -fsroot c:\Jenkins -labels "Prod Win7 %ComputerName%" -master <Jenkins URL> -name farm-%ComputerName% -username <username> -password <password>)

Really appreciate your advise .

Thanks

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Execution of test fails with Runtime or .exe

Post by odklizec » Mon May 02, 2016 8:24 am

Hi,

It's hard to say what's wrong without more details from your side.

What's your Ranorex version?
Please post exact error message you are getting.
Please post the xpath that runs fine with Studio and fails with Runner/exe.
Please post a Ranorex Snapshot of the problematic element.

As for running Ranorex job via Jenkins, it works fine for me. I'm using master/slave configuration, more or less as described in Ranorex blog. The only difference is, that I'm building on one VM (master) and then running the actual test on different VM (slave) with installed Jenkins slave. The necessary files are copied from master VM via copy artifacts plugin.

I'm not quite sure why do you use such complicated command line to start the Jenkins slave? I'm not a Jankins expert, so I'm using a standard JNLP slave batch file, which is configured to start automatically after booting and login to VM. The autologin to VM is done via LogonExpert (way better/secure option than exposing your user name and password in plain file).

BTW, don't forget to copy RanorexConfig5.xml (from C:\Users\yourusername\AppData\Roaming) to all machines where you expect to run your tests! This will make sure you have the same configuration as used during test development. Different Ranorex configuration is the most common reason of failures while running tests on different computers.
Pavel Kudrys
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

Danscorpio13
Posts: 21
Joined: Wed Nov 04, 2015 11:12 am

Re: Execution of test fails with Runtime or .exe

Post by Danscorpio13 » Tue May 10, 2016 1:33 pm

Hi

Sorry for the late response .
I'm pretty much using the same method of Jenkins with slave set-up on test VM.
But building and Running the test on same slave.
I've also copied RanorexConfig5.xml file to vm machine but it doest select certain buttons when running on vm through exe.
Some times browser fails to recognise a click action performed and still keeps searching even after completing that step.
Being an intermittent issue Im unable to get to the bottom of the cause.

XPath
1) Failed to load bitmap from file '..\..\ImageFolder\Button_Screenshot1.bmp'.
..\..\ImageFolder\Button_Screenshot1.bmp
2)/form[@controlname='QuoteWizard']/button[@controlname='nextButton']

User avatar
RobinHood42
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: Execution of test fails with Runtime or .exe

Post by RobinHood42 » Thu May 12, 2016 9:05 am

Hello Danscorpi13,

As you said, it’s very difficult to analyze an intermittent issue.

What I would suggest, is to check whether this issue is reproducible by executing the test without Jenkins, e.g., manually triggering the test executable on your machine.

This would allow you to narrow down the issue a bit. Furthermore, please ensure that required files such as the *.bmp file are available and accessible with your current user privileges.

Hope this information helps.

Cheers,
Robin

amina
Posts: 3
Joined: Tue May 17, 2016 4:00 pm

Re: Execution of test fails with Runtime or .exe

Post by amina » Fri Apr 21, 2017 4:30 pm

Hello,

I still have the some problem as Danscorpio13.

I use Ranorex 6.2.1.

My test suite runs well on my local machine and not on the test VM.

On both environment I have windows 10.

Can I change the resolution of the vm so that it is identical to my local machine?

Because I have found that it applies the actions below the item concerned.

Any suggestions?

Thank you,

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Execution of test fails with Runtime or .exe

Post by krstcs » Fri Apr 21, 2017 4:39 pm

The actual resolution should not matter from one system to the next. Ranorex takes that into account when finding the items during the test.

However, the SCALE FACTOR does matter. All tests should be run with the systems Scale set to 100%.

Any test with VISUAL components, such as image validations, should be done with the same resolution of the images and the same color settings.
Shortcuts usually aren't...

amina
Posts: 3
Joined: Tue May 17, 2016 4:00 pm

Re: Execution of test fails with Runtime or .exe

Post by amina » Thu May 04, 2017 2:22 pm

Hi krstcs,


Sorry for this late response.

I found that the value of the system scal was not the same as my local machine.

I changed it to 100%, it worked for a little moment but then I started to have the same problem.

What I found is that the clicks runs like a down click so to solve the problem I replaced them with a double click. however I still have the problem with the location of the click. It does not click the appropriate location.

Any suggestions?

Thank you,

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Execution of test fails with Runtime or .exe

Post by krstcs » Thu May 04, 2017 4:25 pm

Without seeing a Ranorex Snapshot and the XPath you are using, I can't suggest anything.
Shortcuts usually aren't...