How to Print List of Tests (Test Methods) in Visual Studio Test Project
Introduction
Have you come across any requirement to get/ print the list of all the automated tests in your test project? Each automated test is marked with attribute TestMethod in classes with attribute TestClass in a Test Project.
Microsoft Visual Studio 2010 does not provide direct option to print the list of test methods. Test View window can be used to get the complete list. It is also possible to copy the details from Test View grid. So these details can be pasted to any document/sheet and then be printed.
Steps
- Open Microsoft Visual Studio.
- Open Test project in the Visual Studio.
- Open Test View window in Visual Studio (Test Menu -> Windows -> Test View).
- Customize the required columns, column order, grouping and sort order of tests in Test View. See How to: Customize Test Views.
- Select the tests in the Test View window grid that you want to Copy (Ctrl + A for all test methods).
- Copy the test methods list (Right Click -> Copy).
- Paste the list to Notepad/ Microsoft Office Excel Worksheet/ Microsoft Office Word.
- Print the list. See How do I print a Notepad document? and Print a worksheet or workbook.
See Also
- [[Executing Unit tests from Test Explorer in Visual Studio 2012]]