Different Module Variable Values in the Same Test Case

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Different Module Variable Values in the Same Test Case

Post by Fergal » Tue Oct 31, 2017 1:23 pm

I have a "LogIn" recording module and a "doSomething" recording module in a TC, that looks like this:


TC
  • LogIn
  • doSomething
  • LogIn
The LogIn module is data driven with a variable for username. The first time the LogIn module is used it should use one username variable value. The second time the LogIn module is used (in the same case) it should use a different username variable value.

Is it possible to do that?

Thanks.

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

Re: Different Module Variable Values in the Same Test Case

Post by odklizec » Tue Oct 31, 2017 1:52 pm

Hi,

Yes, it should be possible to achieve what you want. You just have to enclose the Login module in smartfolder and set this smartfolder with data connector and data range of your choice. Like this (code-less way):

Code: Select all

TC
    [SM] <-- data connector with initial data range
    |_LogIn
    doSomething
    [SM] <-- data connector with new data range
    |_LogIn
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

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Different Module Variable Values in the Same Test Case

Post by Fergal » Tue Oct 31, 2017 3:13 pm

Thanks very much odklizec, will try that.