locked
Is there a way to automate running Test Cases contained in a method? RRS feed

  • Question

  • All,

    we are using TFS 2008/MSBuild. Is there any way to automate running test cases ina specific method? That will saves us lots of time.

    Thank you,

    Jagadeesh Urivinty

    Wednesday, December 12, 2012 8:32 PM

Answers

  • I know an ALM guy in the field that has combined Test Impact Analysis as part of test selection for unit tests. The standard process does not support this and I'm not completely sure how he managed to do it.

    I do know that he did this in TFS 2010, so his solution probably won't help you one bit.

    I think the proper answer for TFS 2008 is: you can't. And the proper reason for that is, though you've only changed a few things in your tests, who is to say, you didn't break any other test in the process?


    My blog: blog.jessehouwing.nl

    Thursday, December 13, 2012 5:05 PM
  • By the way, the new Visual Studio 2012 test runner does this out of the box for you, inside Visual Studio.

    My blog: blog.jessehouwing.nl

    Thursday, December 13, 2012 5:06 PM

All replies

  • Can you explain a little more about what you're trying to do here? I do not understand your exact question. Could you share a piece of code or a screenshot maybe to make your point clearer?

    My blog: blog.jessehouwing.nl

    Wednesday, December 12, 2012 10:26 PM
  • Hello Jesse, Thank you for your reply.

    One of the developer wants to add new test cases for his changes, and he wants to execute only his testcases as part of the build. If I call testcases by using below method, incase if theyadd's new testcases, rename's..etc I need to edit the build script again.

    <TestContainer Include="$(SolutionRoot)\TestProject\LoadTest1.loadtest" />

    If I uses project dll's to call test cases, it will execute all the test cases which we don't prefer to execute all old test cases.

    <TestContainer Include="$(OutDir)\HelloWorldTests.dll" />

    They said they will be adding all new classes, is there any way to execute testcases related to their new changes? Let me know if it is not clear enough.

    Thank you,

    Jagadeesh Urivinty


    Thursday, December 13, 2012 4:51 PM
  • I know an ALM guy in the field that has combined Test Impact Analysis as part of test selection for unit tests. The standard process does not support this and I'm not completely sure how he managed to do it.

    I do know that he did this in TFS 2010, so his solution probably won't help you one bit.

    I think the proper answer for TFS 2008 is: you can't. And the proper reason for that is, though you've only changed a few things in your tests, who is to say, you didn't break any other test in the process?


    My blog: blog.jessehouwing.nl

    Thursday, December 13, 2012 5:05 PM
  • By the way, the new Visual Studio 2012 test runner does this out of the box for you, inside Visual Studio.

    My blog: blog.jessehouwing.nl

    Thursday, December 13, 2012 5:06 PM
  • Jesse,

    Makes sense, thanks for the quick reply.

    Jagadeesh Urivinty

    Thursday, December 13, 2012 8:14 PM