How can iterate through a test case where some and not all steps have variable inputs?

Jawab How can iterate through a test case where some and not all steps have variable inputs?

  • 17 April 2012 13:50
     
     

    When I have a test case in which some steps need to be iterated through a data set but some do not, how can I structure the test so I don't have to repeat the steps that are static? In the example below, steps 1 and 6 don't need to be repeated every iteration but steps 2-5 do. Example:

    Step 1: Load the app

    Steps 2 - 5: Loop through a data set to evaluate the effect of different inputs to the application

    Step 6: Unload the app

    Is there a way I can iterate only the steps of this test case that are parameterized (steps 2-5)? I assume I could make three separate test cases that would be part of an order test set like this: step 1 would be Test Case 1; steps 2-5 would be Test Case 2 that iterates through the data set and step 6 would be Test Case 3.  Is that my only option?

    -Jeff


    • Diedit oleh RJS26 17 April 2012 13:51 The original title was wrong.
    •  

Semua Balasan

  • 18 April 2012 6:13
    Moderator
     
     

    Hi Jeff,

    Thank you for your post.

    Are you using MTM manual test? I am trying to involve someone familiar with this topic to further look at this issue.

    Best regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

  • 19 April 2012 14:50
    Pemilik
     
     Jawab

    you could make steps 2-5 into shared steps, with parameters, and create an action recording for the shared step only. After that you can insert the shared step into your test case and add the 1st and last step.

    When you launch this test case in test runner, you can do the first and last step manually, as per need. You can playback the shared step each time.

    Thanks

  • 26 April 2012 12:44
     
     

    Lily,

    I am using MTM manual test. In this scenario I am not using a Coded UI test.

    Jeff

  • 26 April 2012 12:47
     
     

    niveditabawa,

    Thank you for your reply. I will try your suggestion and see if it works for me.

    Jeff

  • 26 April 2012 14:31
     
     

    Why would you use Coded UI Test?

    • To have assertions validate certain states or object contents.

    It is my understanding that unless one creates a CUIT the only way to validate 'things' is by visual inspection...Am I wrong?

    If it true then how does one create multiple asserts in the repeated sections of the CUIT? 

    Thanks much

    sssesq


    • Diedit oleh sssesq 26 April 2012 14:32
    •  
  • 26 April 2012 15:07
     
     

    It seems to me that the question about why one would use a CUIT is no applicable to my original post about manual testing.

    Jeff


    Jeff Smathers

  • 27 April 2012 5:32
    Moderator
     
     

    Hi Jeff,

    Sorry for any inconvenience.

    Seems you find the solution, would you please mark useful posts as answer, they will be very beneficial for other community members having the similar questions.

    Welcome you back whenever you need help.

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us