Skip to content

When missing steps are detected, set the test as failed by default instead of pending/inconclusive #901

@rblemuscriteo

Description

@rblemuscriteo

Reqnroll Version

2.2.1

Which test runner are you using?

NUnit

Test Runner Version Number

4.3.2

.NET Implementation

.NET 8.0

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

No response

Issue Description

The default behaviour of having a pending state when there is a missing step is giving false positives on Visual Studio and Rider because of it not being considered a test failure.

This is not always detected and needs to add a reqnroll.json file with missingOrPendingStepsOutcome set as Error in every lib that uses reqnroll, which, in a microservice environment, can be tedious.

Even when having only inconclusive tests the higher level are considered successes in both

Visual Studio
Image
and Rider
Image

Would it be possible to change the default behaviour to Error instead of Pending in the default config ?

public const MissingOrPendingStepsOutcome MissingOrPendingStepsOutcome = Reqnroll.Configuration.MissingOrPendingStepsOutcome.Pending;

Steps to Reproduce

Add a step in a feature file that is not mapped to any steps defined

Link to Repro Project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions