reqnroll / Reqnroll

Open-source Cucumber-style BDD test automation framework for .NET.
https://reqnroll.net
BSD 3-Clause "New" or "Revised" License
310 stars 32 forks source link

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

Closed gasparnagy closed 3 months ago

gasparnagy commented 3 months ago

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 commented 3 months ago

Fixed by #99