locked
moving hand coded test methods (used in ordered tests) RRS feed

  • Question

  • I have a question about moving test methods used in ordered tests.

    Due to some reasons I need to move many of my hand coded test methods to some other classes within my project.

    The problem is that I have also a lot of ordered Tests based upon the methods I want to move.

    The dependencies within the class are no problem, only a also movable property.

    Is there a solution without touching each ordered test manually to update the test?

     

    Is there maybe a tool helping? (Resharper?)

     

    Ps:

    Also a question is if it is possible to copy a test method in a ordered test:

    from one point to another point within a ordered test

    from one ordered test to another ordered test

    Thursday, August 11, 2011 7:44 AM

All replies

  • I see there will be no support within Visual Studio.

    So I see there is one thing we have to change within the ordered Test file.

    Each included test is linked using with a ID string.

    A procedure doing the move would look like this:

    1) Save all ordered Test cases

    2) Move the Methods to the New Classes (copy paste, correct maybe linked UI map should be easy)

    3) Save new Classes

    4) create new Ordered Test and add ALL test Methods from the new Classes

    5) Use a script which do following steps:

    5.a) Open the new Test case file, take each "name" - IDString

    5.b) search with the name in all other ordered Test files and replace the ID with the new if found.

    6) delet the used ordered test file.

    This only works if the methods have uniq names!

     

    Monday, August 22, 2011 10:35 PM