Best practice for running repeat module in test cases

Best practices, code snippets for common functionality, examples, and guidelines.
atkiwi
Posts: 9
Joined: Fri May 18, 2018 5:17 pm

Best practice for running repeat module in test cases

Post by atkiwi » Wed May 23, 2018 10:51 pm

Hello,

Currently I have a project where the hierarchy currently looks like the following:

>Smart Folder
> > Test Case
> > > Recording Module A
> > Test Case
> > > Recording Module B
> > Test Case
> > > Recording Module C

I have a recording module that needs to be ran for every Test Case in that smart folder. Other testers may only run some of test cases in this Smart Folder so I need them to be able to be ran independent on the order of each one. Currently, I believe I should proceed by copying and pasting the necessary recording module into every test case so my new hierarchy looks like the following:

>Smart Folder
> > Test Case
> > > Recording Module X
> > > Recording Module A
> > Test Case
> > > Recording Module X
> > > Recording Module B
> > Test Case
> > > Recording Module X
> > > Recording Module C

I want to know if there is a cleaner, more efficient way to come to the same result such as running it in a loop, for each test case in smart folder run recording X before any other recording modules.

I have looked up setup which I believe would only run once if any test case in the smart folder is executed. The exception is if I implement the setup on the test case level but then that's pretty much doing the same as copying and pasting the same recording module into each one.

Thanks!

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

Re: Best practice for running repeat module in test cases

Post by odklizec » Thu May 24, 2018 11:42 am

Hi,

I think your actual solution is the best/easiest one. I can't see any better/more efficient way to achieve what you want.
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

atkiwi
Posts: 9
Joined: Fri May 18, 2018 5:17 pm

Re: Best practice for running repeat module in test cases

Post by atkiwi » Thu May 24, 2018 4:29 pm

Okay, I shall proceed with that. Thank you very much for your response.