Execution Sequence for Parameterized Tests
"Charlie Poole" <[email protected]> Tue, 17 Jun 2008 20:40:14 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <000f01c8d0f5$0583fc80$6401a8c0@ferrari> |
Hi All, It has been pointed out that the sequence of execution for parameterized tests needs to be clearly documented. Here is how I'm thinking of it now... 1. Test Assembly is loaded, including any cases specified inline or through static factories 2. Tests are run for each fixture, as follows: 2.1 TestFixtureSetUp is run 2.2 Any Dynamic test cases are generated 2.3 Run each test method (SetUp, Test, TearDown) 2.4 Run TestFixtureTearDown The key question is "How do we distinguish static and dynamic test cases?" I see three options: METHOD 1 - By the data attribute TestCase, RowTest and Factory are static We would add InlineData and DataSource for dynamic METHOD 2 - By the test attribute Anything on a Test is static Anything on a DynamicTest is Dynamic METHOD 3 - By whether the method is static or instance [Factory] public static IEnmerable F() is static [Factory] public IEnumerable F() is dynamic What are your opinions? Charlie ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php