Last active
September 30, 2015 14:08
-
-
Save mhoyer/1804317 to your computer and use it in GitHub Desktop.
Using TagAttribute with StatLight and its -t argument
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestClass] | |
public class Salutes | |
{ | |
[TestMethod] | |
public void ItShouldSayHello() { } | |
[TestMethod, Tag("Important")] | |
public void ItShouldSayGoodBye() { } | |
[TestMethod, Tag("Ignore")] | |
public void ItShouldSaySomething() { } | |
} | |
// StatLight.exe -x=Salutes.Tests.xap # runs all two test methods | |
// StatLight.exe -x=Salutes.Tests.xap -t=Important # runs ItShouldSayGoodBye only | |
// StatLight.exe -x=Salutes.Tests.xap -t=!Important # runs ItShouldSayHello and ItShouldSaySomething only | |
// StatLight.exe -x=Salutes.Tests.xap -t=!(Important+Ignore) # runs neither ItShouldSayHello nor ItShouldSaySomething | |
// The TagAttribute can be used on class level as well. | |
[TestClass, Tag("Exclude")] | |
public class Test | |
{ | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment