Hi,
with both NUnit and MSTest you can use the @ignore tag:
@ignore
Scenario: All Strikes
Given a new bowling game
When all of my rolls are strikes
Then my total score should be 300
This tag gets translated into a IgnoreAttribute of the respective framework. TestRunners then do not run these tests.
With NUnit however I suggest using a custom tag (i.e. WIP):
@WIP
Scenario: One single spare
Given a new bowling game
When I roll the following series: 2,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Then my total score should be 29
The tag then gets translated into a NUnit Category when saving the feature-file in VS.
When running the tests with nunit-console you can use the the /exclude flag so skip those tests:
C:\Users\jba\Dev\Projects\SpecFlow-Examples\BowlingKata\BowlingKata-Nunit>nunit-console /labels /nologo /exclude:WIP Bowling.Specflow\bin\Debug\Bowling.Specflow.dll
For MSTest you can also use Test-Lists, although it is a bit tedious:
In your .vsmdi (Test List Editor) you can define a test list "non-WIP". Then you can put tests that should be executed into this test-list.
With MSTest you can then use the option /testlist to execute only tests in this list:
C:\Users\jba\Dev\Projects\SpecFlow-Examples\BowlingKata\BowlingKata-MsTest>MSTest /testmetadata:Bowling.vsmdi /testlist:Not-WIP
Unfortunately it seems not possible to exclude a test-list...
The VS2010 Version of MSTest seems also to support TestCategories (
http://msdn.microsoft.com/en-us/library/ms182489%28VS.100%29.aspx). we have to look into this for future versions of SpecFlow.
I hope this helps? Any other ideas?
jonas
--
mail:
jonas...@gmail.comweb:
www.jonasbandi.netblog:
blog.jonasbandi.net
twitter:
twitter.com/jbandi