Need help ! Ranorex multiple test suite execution in jenkins

Ask general questions here.
Noah
Posts: 11
Joined: Tue Aug 21, 2018 1:31 pm

Need help ! Ranorex multiple test suite execution in jenkins

Post by Noah » Tue Aug 21, 2018 1:45 pm

Hello,

my project has got 2 test suite files with name 1) It.rxtst 2)Itte_Environment.rxtst and in Jenkins I scheduled a job to run with
the test suite file name as"Itte_Environment.rxtst" please take a look at the image attached.

when I run a new build I get this below error.

c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns>".\trunk\Itte\bin\Debug\Itte.exe" /reportfile:"c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\.\Reports\378\ITTE.html" /junit /zipreport /zipreportfile:"c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\.\Reports\378\ITTE-378.rxzlog" /pa:Domain=https://10.158.118.16:28443 /tc=CancelSSN
[2018/08/21 14:03:26.461][Debug ][Logger]: Console logger starting.
[2018/08/21 14:03:26.483][Error ][User]: Unexpected exception occurred: System.InvalidOperationException: There is more than one test suite and some arguments in '".\trunk\Itte\bin\Debug\Itte_Environment.rxtst .exe" [/u]/reportfile:"c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\.\Reports\378\ITTE.html" /junit /zipreport /zipreportfile:"c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\.\Reports\378\ITTE-378.rxzlog" /pa:Domain=https://10.158.118.16:28443 /tc=CancelSSN' require it to specify which test suite to use by using the 'testsuite' command line parameter.
at Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType, String cmdLineArgs, String testSuiteXml)
at Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType, String cmdLineArgs)
at Itte.Program.Main(String[] args) in c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\trunk\Itte\Program.cs:line 39
[2018/08/21 14:03:26.621][Debug ][Logger]: Console logger stopping.
Build step 'Run a Ranorex test suite' changed build result to FAILURE
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\Reports\378 to C:\ohj\Jenkins\jobs\ITTE_Automation\jobs\ITTE_Single_Testruns\builds\378\htmlreports\ITTE
ERROR: Specified HTML directory 'c:\ohj\jenkins.start\workspace\ITTE_Automation\ITTE_Single_Testruns\Reports\378' does not exist.
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
Attachments
jenkins image 8-21-2018 6-06-40 PM.jpg
jenkins image 8-21-2018 6-06-40 PM.jpg (120.77 KiB) Viewed 980 times

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

Re: Need help ! Ranorex multiple test suite execution in jenkins

Post by odklizec » Tue Aug 21, 2018 2:46 pm

Hi,

I believe you need to add a testsuite parameter to the Command line arguments section of Ranorex plugin. Please see the screenshot from my Jenkins setup. Similarly, you need to define the testsuite parameter, pointing to your testsuite. Hope this helps?
TestSuite_param.png
TestSuite_param.png (25.03 KiB) Viewed 976 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

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

Re: Need help ! Ranorex multiple test suite execution in jenkins

Post by Support Team » Tue Aug 21, 2018 2:56 pm

Hi all,

@Pavel: Thank you for jumping in :)

Pavel's suggestion is correct, due to some changes in the latest Ranorex versions (Feature: Multiple Test Suites) it is currently necessary to add the '/ts' parameter.
I'm currently working on an update of the plugin to match the latest Ranorex version. If you are having any feedback or requests, please feel free to share them on the corresponding GitHub repo

Thanks,
Markus (S)
.
Image

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

Re: Need help ! Ranorex multiple test suite execution in jenkins

Post by odklizec » Wed Aug 22, 2018 11:09 am

Hi Markus, you are welcome. I'm always glad to help ;)
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

User avatar
Erik Skrabak
Certified Professional
Certified Professional
Posts: 1
Joined: Tue Sep 04, 2018 3:06 pm
Location: Trnava, Slovakia
Contact:

Re: Need help ! Ranorex multiple test suite execution in jenkins

Post by Erik Skrabak » Tue Nov 27, 2018 4:39 pm

Hello,

I also have multiple Testsuite files in my project - let's say TS_A.rxtst and TS_B.rxtst.
In Jenkins i would like to start a job with one specific tescase (TC_X) within TS_A.rxtst only.

My Jenkins-Job configuration looks like this (see attachment).

The test fails with following exception:

"Unexpected exception occurred: Ranorex.RanorexException: There are multiple test suite files in the assembly directory. Please specify the test suite by using command line parameters or rename the test suite file to the current assembly name.
bei Ranorex.Core.Testing.TestSuiteRunner.GetTestSuiteXml(Type containerType, String fileName)
bei Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType, String cmdLineArgs, String testSuiteXml)
bei Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType, String cmdLineArgs)
bei owi21V4.Program.Main(String[] args) in C: ..."

Does anyone please have an idee how to configure this job so that only testcase TC_X from TS_A.rxtst will be startet?

Thank You!
Attachments
multiple_testsuites_jenkins.PNG
multiple_testsuites_jenkins.PNG (34.99 KiB) Viewed 828 times
Erik Skrabak

Image

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

Re: Need help ! Ranorex multiple test suite execution in jenkins

Post by Support Team » Tue Nov 27, 2018 9:05 pm

Hi Erik,

Markus (the developer of the Jenkins Ranorex Plugin) is currently working on updating this plugin to be compatible with multiple test suites.
I'm currently working on an update of the plugin to match the latest Ranorex version. If you are having any feedback or requests, please feel free to share them on the corresponding GitHub repo
In the meantime, you can use the standard "Execute Windows batch command" in Jenkins with the desired arguments. For a full list of available arguments, check out this page in our user guide ("Command line arguments" section).

Example:

Code: Select all

ProjectA.exe /ts:TestSuite2.rxtst /tc:TestCase2
1.png
1.png (4.24 KiB) Viewed 825 times
I hope this helps!

Cheers,
Ned
.
Image

ggalpris
Posts: 1
Joined: Tue May 28, 2019 8:55 am

Re: Need help ! Ranorex multiple test suite execution in jenkins

Post by ggalpris » Tue May 28, 2019 9:00 am

Support Team wrote:
Tue Aug 21, 2018 2:56 pm
I'm currently working on an update of the plugin to match the latest Ranorex version. If you are having any feedback or requests, please feel free to share them on the corresponding GitHub repo

Markus (S)
Hello Markus

are there any news regarding the plugin update?

Best regards Georgina