say that i have the following setup:
[TestFixture, Category("aCategory"), Category("anotherCategory")]
public class SomeClass{
[Test]
public void SomeTest()
{
//testing
}
}
how many times will the SomeTest be run? once, with the results shown in both categories, or twice, once for each category?
In NUnit, categories act more like filters than a grouping mechanism.
When selecting the tests to run, you can include or exclude multiple categories, which will affect which tests are selected for a given run of the test suite.
You can assign multiple categories to a test class or method, but for a given run of the suite, each method will only be executed once.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With