Page 1 of 1

Different Module Variable Values in the Same Test Case

Posted: Tue Oct 31, 2017 1:23 pm
by Fergal
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.

Re: Different Module Variable Values in the Same Test Case

Posted: Tue Oct 31, 2017 1:52 pm
by odklizec
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

Re: Different Module Variable Values in the Same Test Case

Posted: Tue Oct 31, 2017 3:13 pm
by Fergal
Thanks very much odklizec, will try that.