Page 1 of 1

Execution of test fails with Runtime or .exe

Posted: Fri Apr 29, 2016 2:45 pm
by Danscorpio13
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

Re: Execution of test fails with Runtime or .exe

Posted: Mon May 02, 2016 8:24 am
by odklizec
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.

Re: Execution of test fails with Runtime or .exe

Posted: Tue May 10, 2016 1:33 pm
by Danscorpio13
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']

Re: Execution of test fails with Runtime or .exe

Posted: Thu May 12, 2016 9:05 am
by RobinHood42
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

Re: Execution of test fails with Runtime or .exe

Posted: Fri Apr 21, 2017 4:30 pm
by amina
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,

Re: Execution of test fails with Runtime or .exe

Posted: Fri Apr 21, 2017 4:39 pm
by krstcs
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.

Re: Execution of test fails with Runtime or .exe

Posted: Thu May 04, 2017 2:22 pm
by amina
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,

Re: Execution of test fails with Runtime or .exe

Posted: Thu May 04, 2017 4:25 pm
by krstcs
Without seeing a Ranorex Snapshot and the XPath you are using, I can't suggest anything.