Ranorex suite run through Jenkins hangs at the end

Bug reports.
automationTest008
Posts: 2
Joined: Fri Oct 04, 2019 8:10 pm

Ranorex suite run through Jenkins hangs at the end

Post by automationTest008 » Fri Oct 04, 2019 8:31 pm

Hi,

I have set up a jenkins pipeline that pulls two projects from git and runs one full test suite through the command line. It works fine if I set my run configurations to 1 test but when I choose all 14 tests I have issues at the very end. Everything runs well and reports everything to testrail but at the very last step which is to output that the test suite has passed, I just get a spinning ball forever in the Jenkins console output and Ranorex never exits on my test machine. This is a comparison of the run with 1 test and the run with 14 tests.

For 1 test, the module, test case, smart folder, and test suite return with a status of Success
[2019/10/04 15:01:35.872][Success][Test]: Test Module 'EUHL_Disc_Single_RFQ_WS_001' completed with status 'Success'.
[2019/10/04 15:01:35.910][Success][Test]: Test Case 'EUHL_SIngleRFQWS_01' completed with status 'Success'.
[2019/10/04 15:01:36.986][Info   ][Test]: Test Module 'TearDown (xAutomation)' started.
[2019/10/04 15:01:46.601][Success][Test]: Test Module 'TearDown (xAutomation)' completed with status 'Success'.
[2019/10/04 15:01:47.778][Success][Test]: Smart Folder 'Single_RFQ' completed with status 'Success'.
[2019/10/04 15:01:47.778][Success][Test]: Smart Folder 'EU_HL' completed with status 'Success'.
[2019/10/04 15:01:47.780][Success][Test]: Test Suite 'euro' completed with status 'Success'.
[2019/10/04 15:01:47.797][Debug  ][Logger]: Console logger stopping.
For the 14 tests, the module, test case, and smart folder all return with status failed but the test suite never returns. It just hangs forever. The failures are expected because the environment isn't correct but the suite should also return with status failed.
[2019/10/04 15:07:33.184][Failure][Test]: Test Module 'ProcessTradeRTS_Xcludedlr' completed with status 'Failed'.
[2019/10/04 15:07:33.184][Failure][Test]: Test Case 'EUHL_ProcessTrade_04' completed with status 'Failed'.
[2019/10/04 15:07:34.355][Info   ][Test]: Test Module 'TearDown (xAutomation)' started.
[2019/10/04 15:07:46.207][Success][Test]: Test Module 'TearDown (xAutomation)' completed with status 'Success'.
[2019/10/04 15:07:47.290][Failure][Test]: Smart Folder 'Process_Trade' completed with status 'Failed'.
[2019/10/04 15:07:47.290][Failure][Test]: Smart Folder 'EU_HL' completed with status 'Failed'.
I looked at the ranorex logs and see again that the test suite never returns. It just keeps outputting the same license line over and over and over until I kill the process.
2019-10-04 15:07:46.207| INFO|Ranorex.Report|Test: Test Module 'TearDown (xAutomation)' completed with status 'Success'.
2019-10-04 15:07:47.290|ERROR|Ranorex.Report|Test: Smart Folder 'Process_Trade' completed with status 'Failed'.
2019-10-04 15:07:47.290|ERROR|Ranorex.Report|Test: Smart Folder 'EU_HL' completed with status 'Failed'.
2019-10-04 15:08:26.876|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:09:26.877|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:10:26.891|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:11:26.905|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:12:26.906|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:13:26.920|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:14:26.937|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
2019-10-04 15:15:26.937|DEBUG|Ranorex.Core.LicensingConfiguration+LicensingNLogLogger|Will create dual mode TCP client.
I have no idea why this is happening but it's only when I run from Jenkins. If I run everything from the Ranorex IDE, it finishes properly and doesn't hang. If anyone has any ideas, please help.

I'll attach some screenshots with the spinning ball from Jenkins and the finished ranorex test run that just hangs forever.
Image
Image

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

Re: Ranorex suite run through Jenkins hangs at the end

Post by odklizec » Mon Oct 07, 2019 8:29 am

Hi,

The images you posted are not available in your posts. However, I've experienced a similar issue with Ranorex and Jenkins and the source of problem was popupwatcher, which was not properly closed at the end of test. Are you using popupwatcher in your tests? And if yes, are you closing it (all its threads) at the end of test? ;)
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

automationTest008
Posts: 2
Joined: Fri Oct 04, 2019 8:10 pm

Re: Ranorex suite run through Jenkins hangs at the end

Post by automationTest008 » Mon Oct 07, 2019 1:49 pm

odklizec wrote:
Mon Oct 07, 2019 8:29 am
Hi,

The images you posted are not available in your posts. However, I've experienced a similar issue with Ranorex and Jenkins and the source of problem was popupwatcher, which was not properly closed at the end of test. Are you using popupwatcher in your tests? And if yes, are you closing it (all its threads) at the end of test? ;)
I actually AM using the popupwatcher in my framework. Closing it at the end of every test would be a bit of a pain... Are you saying that if i run 14 tests, there are 14 instances of the pop-up watcher out there? I might have to redesign how we implemented it if that's the case. It's worth a shot so thanks for the info. I'l report back after I try it.

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

Re: Ranorex suite run through Jenkins hangs at the end

Post by odklizec » Mon Oct 07, 2019 2:20 pm

Hi,

Yes, all popupwatchers must be closed at the end of test. Luckily for you, you don't have to close them one by one. There is a method called StopAllPopupWatchers (in AutomationHelpers). Just add a code module to TearDown section of a test suite, which contains StopAllPopupWatchers method. Hope this helps?
StopAllPopupWatchers.png
StopAllPopupWatchers.png (35.33 KiB) Viewed 220 times
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