OwnerAttribute Or: How To Own Visual Studio 2008 Unit Test
When working on a large project with a lot of test methods, that each one of them might be under the responsibility of another developer, finding your own unit test methods in the endless list is just like finding a needle in a haystack.
This can be easily become much simple.
When creating unit test for a process, Visual Studio generates unit test method decorated with the TestMethodAttribute. Now, to “own” the unit test, just add new attribute named “OwnerAttribute” which specify the person responsible for the process behind that unit test.
Sample:
[TestMethod]
[Owner("Tamir Shlomi")]
public void UnitTestMethod()
{
...
}
Now, after you marked all your unit test with the OwnerAttribute, all you need to do to find your own unit tests is opening the TestView window (Test –> Windows –> TestView) and filter by Owner using the name you supplied at the OwnerAttribute and only yours unit tests will be listed, ready for running.
Hope this helps,
Tamir Shlomi