Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding @ignore to an Examples block generates invalid code for NUnit v3+ #103

Closed
gasparnagy opened this issue Apr 16, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@gasparnagy
Copy link
Contributor

Reqnroll Version

1.0.1

Which test runner are you using?

NUnit

Test Runner Version Number

3.13.1

.NET Implementation

.NET 8.0

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

No response

Issue Description

Adding @ignore to an Examples block generates invalid code for NUnit v3+:

It complains that the [TestCase] attribute does not have a property Ignored. The generated code is: [TestCase(..., Ignored = true)].

This was working with NUnit v2, but not since v3 anymore. A version that works everywhere:

[TestCase(..., IgnoreReason = "Some reason")]

Steps to Reproduce

Have a scenario outline like this:

Scenario Outline: SO
When the step <result>
Examples:
    | result       |
    | passes       |
@ignore
Examples:
    | result       |
    | ignored      |

Build project

Link to Repro Project

System Tests project

@gasparnagy gasparnagy added the bug Something isn't working label Apr 16, 2024
gasparnagy added a commit that referenced this issue Apr 16, 2024
@gasparnagy
Copy link
Contributor Author

Fixed by #99

gasparnagy added a commit that referenced this issue Apr 17, 2024
* Commit to flesh out Generation System Test.

* Added test to verify that async step bindings are executed in the order specified in the Scenario.

* Tests that verify that Before/After Hooks are run.

* cleanup; promoted some code from GenerationTestBAse to SystemTestBase.

* Adjusted the expectations of the Undefined Step test to account for different handling by MSTest.
Adjusted Ignored test to disable row tests; this provides for consistent handling by all three test frameworks.

* fix build

* code cleanup

* refactor common scenarios

* Improve hook / step assertions

* Merge outcome related tests

* Fixes Adding @ignore to an Examples block generates invalid code for NUnit v3+ issue (#103)

* Add fix to CHANGELOG

* cleanup

* Test scenario outlines (nr of examples, params are available in ScenarioContext, examples tags)

* Add portability tests for before/after test run hooks (.NET Framework version of Reqnroll is subscribed to assembly unload)

---------

Co-authored-by: Chris Rudolphi <1702962+clrudolphi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant