Test step with data iteration

8 posts, 0 answers
  1. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 07 Aug 2011 Link to this post

    Is it possible to create a test that has a test step at the start with a data bind?

    For example: I had a test that used an XLS dataset for the navigation URL at the start.  This worked successfully: it navigated to the first URL in the data, logged in and continued through the test successfully before doing the next iteration of the dataset.

    I wanted to try a test step, so I made two copies of the original test - one that did the navigate and login, and one that continued on the test AFTER the login was successful.

    However, the 2nd iteration fails and looking at the log it looks like it is doing the first navigate and login, then switches and does the 2nd navigate and login, then continues with the test.

    How do I get it to wait to the end of the test before doing the next iteration.  Is it even possible?

    Thanks in advance
  2. Cheryl
    Cheryl avatar
    45 posts
    Member since:
    Jul 2006

    Posted 07 Aug 2011 Link to this post

    Solution found: I hadn't marked the test step to be a fragment of a test, or to inherit the data from its parent.  With these both checked it now works as required.
  3. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 08 Aug 2011 Link to this post

    Hello Cheryl,

    We're glad you found a solution. Please post again if you have further questions.

    Kind regards,
    Anthony
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
  4. Petr
    Petr avatar
    17 posts
    Member since:
    Sep 2012

    Posted 20 Nov 2012 Link to this post

    Hello,

    I face the same problem as Cheryl. However, I`m not able to solve it. Could you please advise?

    My situation is as follows. I have a test which has three test as step included. Please see attached. I have this test and also subtests data-drived. I want to be able to run the whole test in the first iteration, then in second, third, etc. However, current settings behaves differently. While executing the first step is executed and then login itself repeats as many times as it is set by data drive.

    I guess it`s somewhere in settings. Please see attached another screenshot. I think it`s connected to checkboxes "IsTestFragment" or "InheritParentData". However, I haven`t been able to figure it out yet.

    Thank you.

    Best regards,

    Petr
  5. Mercedes
    Mercedes avatar
    6 posts
    Member since:
    Jul 2012

    Posted 20 Nov 2012 Link to this post

    Did you try enabling the "Inherit Parent Data" checkbox in the properties. The screenshot shows that it is disabled.
  6. Petr
    Petr avatar
    17 posts
    Member since:
    Sep 2012

    Posted 21 Nov 2012 Link to this post

    Hey Brian,

    Yeah, I tried to enable the "Inherit Parent Data" but it still doesn`t work. Can it be done just via some settings or does it have to be done by a coded step? If so, do you know how?

    Thanks.

    Petr
  7. Petr
    Petr avatar
    17 posts
    Member since:
    Sep 2012

    Posted 21 Nov 2012 Link to this post

    Brian,

    I was able to figure it out;-) I had to enable "Inherit Parent Data" and "IsTestFragmented". However, I still have some other questions. My test consists of login and then other steps where some of them are as a test step. I want to do login only once and then repeat my other steps. Is there any way how to enable repeating only steps after login? Login is always the same so I`d be losing time repeating it all the time.

    Thank you.

    Petr
  8. Mercedes
    Mercedes avatar
    6 posts
    Member since:
    Jul 2012

    Posted 21 Nov 2012 Link to this post

    If you want to login once and repeat the rest of the steps, you can keep the repeating steps in a subtest and data bind the subtest.

    See the screenshots for help. I have a maintest which occurs only once as it is not data bound and a sub test which is data bound and repeats based on the number of records in the databind.
Back to Top