Create Run Configuration at Run Time

Ask general questions here.
tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Create Run Configuration at Run Time

Post by tvu » Tue Dec 20, 2016 7:51 pm

Is there a way to create a run configuration at run time? This is what I want to do with my Jenkins setup:
  • Run my test suite
  • Get a list of failed test cases (if any)
  • Create and run a Run Configuration for only the failed test cases
I'm sure this has been asked before, but I can't seem to find it in the forum.

Thanks in advance.

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

Re: Create Run Configuration at Run Time

Post by RobinHood42 » Fri Dec 23, 2016 8:28 am

Hi tvu,

I'm afraid that this use case can't be (easily) implemented with Ranorex.

Your scenario requires each test case to be able to be executed in a standalone manner, so there can't be any preconditions. I could imagine that splitting up those test cases into individual projects would really help you in reaching your requirements. 8)

Cheers,
Robin
Last edited by RobinHood42 on Fri Dec 23, 2016 8:38 am, edited 1 time in total.

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: Create Run Configuration at Run Time

Post by Martin » Fri Dec 23, 2016 8:36 am

Well it kind of can be possible. Would mean a lot of custom implementation though. Wouldn't really be a good aproach. But basically have all the testcases with their own run configurations. Read the result report and get the failed TC-s from there and add functionality to call the required run configuration specific jobs in Jenkins. But again, looks more like an overkill.

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Create Run Configuration at Run Time

Post by tvu » Sat Jan 14, 2017 1:34 am

I was able to achieve my goals using Jenkins and Ranorex. I did the following:
  • Run my test suite with one Jenkins build job.
  • In the test suite teardown, I saved a list of failed test cases (if any) to a CSV file.
  • If their was a failure, Jenkins would trigger a downstream job
  • The downstream job would run a different Ranorex run configuration. This run configuration has one test case that is data bound to the above mentioned CSV file. The test case would enable all the listed failed test cases in the CSV file. This test case must precede all the test cases you would possibly want to re-enable.
Hope that helps anyone who is looking to do the same.