Datadriven teststeps

2 posts, 1 answers
  1. JD
    JD avatar
    1 posts
    Member since:
    Aug 2011

    Posted 29 Aug 2011 Link to this post

    Hello,

    I've a little problem.
    We have a application and i've made 2 coded steps.
    1. Login to the application.
    2. Start a work (this part is what i want to datadrive).

    The problem seems to be that i can't just get the repeat on step 2. It wanna run the Codedstep "Username Login" aswell.
    This is the code that i'm using. Works fine on the first run, but on the second run it fails.
    So my question is if there is possible to loop just one specific step with the datadriven test.

     

            [CodedStep("Username Login")]

             public void TRT_Login()

             {

                 var functions = new TRTFunc();

                 functions.LoginUser("Admin", "");

             }

             [CodedStep("Start work from priority plan")]

             public void StartWorkFromPriorityPlan()

             {

                 var functions = new TRTFunc();

                 functions.StartWork(Convert.ToString(Data["anst"]), Convert.ToString(Data["antal"]));

             }

  2. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 29 Aug 2011 Link to this post

    Hi Jonas,

    I'm sorry you are running into this problem. It appears that you are after our Test as Step feature.
    1. Login 
    2. Test as Step (Start a work)

    Please also check this KB article on "Repeating actions for multiple users with login".

    Hope this helps!

    Kind regards,
    Plamen
    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Back to Top