Jenkins Job Ranorex test - application window not to front

Ranorex Spy, Recorder, and Studio.
TestXYZ
Posts: 16
Joined: Thu Aug 29, 2013 12:55 pm

Jenkins Job Ranorex test - application window not to front

Post by TestXYZ » Wed Sep 18, 2013 9:45 am

Hello all,
I have configured Jenkins Job which should run Ranorex test case “c:\Test.exe /tc:MyTest”. But the job cannot bring the Application windows to the front. So that Ranorex can not find any UI element. The test failed. If I run the same test case in Ranorex solution, then everything goes well. Any Idea? Many thanks!
Last edited by TestXYZ on Mon Oct 07, 2013 9:41 am, edited 1 time in total.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Jenkins Job Ranorex test - application window not to front

Post by Support Team » Thu Sep 19, 2013 12:50 pm

Hello,

Have you already read the blog "Integrating Ranorex Automation in Jenkins CI Process" on our website? Maybe you have overlooked some settings?

Regards,
Bernhard
.
Image

TestXYZ
Posts: 16
Joined: Thu Aug 29, 2013 12:55 pm

Re: Jenkins Job Ranorex test - application window not to front

Post by TestXYZ » Mon Sep 23, 2013 12:36 pm

Hi Bernhard,
i have checked the blog several times and could not find any points about that. Maybe it is based on Jenkins Job Engine. I also try to put use code to bring the application windows to front, but it does not work in Jenkins. Very strange, maybe I can not run more than one TC in one Job one after another? Thanks
Best Regards.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Jenkins Job Ranorex test - application window not to front

Post by Support Team » Wed Sep 25, 2013 1:34 pm

Hello,

I have seen that you also wrote a comment to the blog and it seems that you have already solved the issue.
Please let me know if I am wrong.

Regards,
Bernhard
.
Image

TestXYZ
Posts: 16
Joined: Thu Aug 29, 2013 12:55 pm

Re: Jenkins Job Ranorex test - application window not to front

Post by TestXYZ » Thu Sep 26, 2013 9:54 am

Hello Bernhard,

The post to the blog is only about the common login problem based on security settings in Jenkins. Now I can start test case in Jenkins, but the execution of several test cases sequentially in Jenkins Job was still failed, because in these test cases the application windows not focused and not to front, very strange... Any idea? Many thanks

Best Regards

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Jenkins Job Ranorex test - application window not to front

Post by Support Team » Fri Sep 27, 2013 10:59 am

Hello,

Thank you for the clarification.
Please try to make an EnsureVisible() or a click on the main window at the beginning of your test cases.
This could solve the issue.

Regards,
Bernhard
.
Image

TestXYZ
Posts: 16
Joined: Thu Aug 29, 2013 12:55 pm

Re: Jenkins Job Ranorex test - application window not to front

Post by TestXYZ » Mon Oct 07, 2013 9:46 am

Hello Bernhard,

Thanks for your post. I set the “Use Ensure Visible” on “True” then I have to put one command execution "ThreadSleep(5 Sec.)" between /tc:MyTest1 and /tc:MyTest2. It might be a workaround, I do not why but it works. Many thanks!

Best Regards

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Jenkins Job Ranorex test - application window not to front

Post by Support Team » Mon Oct 07, 2013 10:12 pm

Hello,

Thank you for the information.
I am glad that you could find a workaround.

Regards,
Bernhard
.
Image