locked
How to bulk add test category information to existing unit test suite VS 2010 RRS feed

  • Question

  • Anyone know of a quick way to add test category information to a large set of unit tests in VS2010?  We have thousands of unit tests without category information.  The easiest way so far that I found is from the Test View Window > Properties (paste) but will be tedious.  There has to be a faster more efficient way (I hope).


    -7

    Tuesday, October 16, 2012 10:52 PM

Answers

  • Hello Smyrin,

    Thank you for posting in the MSDN forum.

    As far as I know, I don’t think there is a quick way to add test category information for thousands of unit tests. But we can reduce the workload as much as possible. For example, you can define test lists to group your tests. What you need to do is that you create some test lists and then drag tests to the destination test list. I think that this workload is much less than defining test categories for unit test through Test View->Properties.

    For more information, you can refer to the following articles:

    How to: Create a Test List

    How to: Organize Tests into Test Lists

    Or you can manually add test categories for unit tests directly in every unit test using a [TestCategory()] attribute.

    For detailed information, you can refer to the section ”To manually add test categories to a test” in the following article:

    How to: Group and Run Automated Tests Using Test Categories

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by Amanda Zhu Monday, October 22, 2012 12:41 AM
    • Marked as answer by Amanda Zhu Monday, October 22, 2012 12:41 AM
    Wednesday, October 17, 2012 8:27 AM