Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XUnit2ProviderFeature added in TechTalk.SpecFlow.Specs.
Use of xunit.runner.console V2. Xunit2TestGeneratorProvider updated to generate IClassFixture instead of ICollectionFixture.
- Loading branch information
Showing
18 changed files
with
2,869 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
88 changes: 88 additions & 0 deletions
88
Tests/TechTalk.SpecFlow.Specs/Features/XUnit2Provider.feature
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
Feature: XUnit v2 unit test provider | ||
|
||
Scenario Outline: Should be able to execute scenarios with basic results | ||
Given there is a SpecFlow project | ||
And the project is configured to use the xUnit provider | ||
And a scenario 'Simple Scenario' as | ||
""" | ||
When I do something | ||
""" | ||
And all steps are bound and <step definition status> | ||
When I execute the tests with xUnit | ||
Then the execution summary should contain | ||
| Total | <result> | | ||
| 1 | 1 | | ||
|
||
Examples: | ||
| result | step definition status | | ||
| Succeeded | pass | | ||
| Failed | fail | | ||
|
||
Scenario: Should be able to ignore a scenario outline | ||
Given there is a SpecFlow project | ||
And the project is configured to use the xUnit provider | ||
And there is a feature file in the project as | ||
""" | ||
Feature: Simple Feature | ||
@ignore | ||
Scenario Outline: Simple Scenario Outline | ||
Given there is something | ||
When I do <what> | ||
Then something should happen | ||
Examples: | ||
| what | | ||
| something | | ||
| something else | | ||
""" | ||
And all steps are bound and pass | ||
When I execute the tests with xUnit | ||
Then the execution summary should contain | ||
| Succeeded | | ||
| 0 | | ||
|
||
Scenario Outline: Should handle scenario outlines | ||
Given there is a SpecFlow project | ||
And the project is configured to use the xUnit provider | ||
And row testing is <row test> | ||
Given there is a feature file in the project as | ||
""" | ||
Feature: Simple Feature | ||
Scenario Outline: Simple Scenario Outline | ||
Given there is something | ||
When I do <what> | ||
Then something should happen | ||
Examples: | ||
| what | | ||
| something | | ||
| something else | | ||
""" | ||
And all steps are bound and pass | ||
When I execute the tests with xUnit | ||
Then the execution summary should contain | ||
| Succeeded | | ||
| 2 | | ||
|
||
Examples: | ||
| case | row test | | ||
| Normal testing | disabled | | ||
| Row testing | enabled | | ||
|
||
@config | ||
Scenario: Should be able to specify xUnit provider in the configuration | ||
Given there is a SpecFlow project | ||
And a scenario 'Simple Scenario' as | ||
""" | ||
When I do something | ||
""" | ||
And all steps are bound and pass | ||
And the specflow configuration is | ||
""" | ||
<specFlow> | ||
<unitTestProvider name="xUnit"/> | ||
</specFlow> | ||
""" | ||
When I execute the tests with xUnit | ||
Then the execution summary should contain | ||
| Total | | ||
| 1 | | ||
|
Oops, something went wrong.