reqnroll / Reqnroll.Rider

Rider plugin for Reqnroll - open-source .NET BDD framework
MIT License
41 stars 11 forks source link

Issues with Cucumber Expressions #2

Open konarx opened 9 months ago

konarx commented 9 months ago

Related to #63

Reqnroll Version

1.0.1

Which test runner are you using?

NUnit

Test Runner Version Number

4.5.0

.NET Implementation

.NET 6.0

Test Execution Method

ReSharper Test Runner

Content of reqnroll.json configuration file

{
  "$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json",
  "bindingAssemblies": [
    {
      "assembly": "My.External.NuGet"
    }
  ]
}

Issue Description

I am using Rider with the latest build of the Rider.Reqnroll plugin. In a pretty easy Scenario:

@login
Scenario: Invalid login to My App
    When the user fills credentials as, username: my_user and password: 123pass456
    And clicks Login
    Then the user is not successfully logged in My App

I have a Step Definition, based on Cucumber Expressions:

[When("the user fills credentials as, username: {word} and password: {word}")]
public async Task WhenTheUserFillsCredentialsAsUsernameAndPassword(string username, string password)
{
     _scenarioContext["currentUser"] = username;
     await _loginPage.FillCredentials(username, password);
}

This causes two issues:

  1. The execution marks the test as Inconclusive and gives me the following log:

    When the user fills credentials as, username: my_user and password: 123pass456 -> No matching step definition found for the step. Use the following code to create one: [When(@"the user fills credentials as, username: my_user and password: (.)pass(.)")] public void WhenTheUserFillsCredentialsAsUsernameMy_UserAndPasswordPass(int p0, int p1) { _scenarioContext.Pending(); }

    It seems like it does not support Cucumber Expressions. Is that a known issue? Do I do something wrong?

  2. While the other Step Definitions are ok (they are not using Cucumber Expressions but Regex), all the other Steps within the same .feature file marked as "Cannot find a matching step definition", but the runner identifies them and run the tests successfully! Strange, uh? image

Steps to Reproduce

Implement the above Scenario

Link to Repro Project

No response

Socolin commented 8 months ago

This is not supported yet, only the regex are supported for now.

It should be implemented in the future. I don't think this should be such a big things to add.