SpecFlowOSS / SpecFlow.Rider

SpecFlow support for both ReSharper and Rider
MIT License
29 stars 19 forks source link

Running test from feature file #210

Open CarstenGruenzner opened 9 months ago

CarstenGruenzner commented 9 months ago

Hi,

up to Rider 2023.2 the SpecFlow plug-in was able to start a single scenario or all scenarios of the feature file just from feature file. Also there was an indicator at the scenario if the last run was successful or failed. Both were very useful features, but they are no longer working in Rider 2023.3 and the most recent SpecFlow plug-in version 1.23.6. It is no longer possible to start a scenario form the feature file, there is no indication if a scenario was successful. image

Were those features removed by intention or is this a bug? Because my workflow is feature file centered, I would be very happy if the features came back again. The best workaround I found was starting the AT of a feature file from the Structure View. But this gave me neither the ability to start a single test, nor there is an indicator if an AT has failed.

Finding the AT first in the unit tests view is not as comfortable as it was before. Of course, I can see which AT has failed and which tests where successful in the unit test view, but I have to match it manually with the feature file. Identifying the failed test this way is far more cumbersome than it was before.

joel-agicap commented 9 months ago

Same problem here, thanks for the workaround it works for me too. Next time I'll wait before upgrading rider version, lesson learned.

Socolin commented 9 months ago

Can you provide the namespace / class of the generated file and the full path of the folder (screenshot of the file in the tree will give all I need)

joel-agicap commented 9 months ago

here's the beginning of the generated class:

// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated by SpecFlow (https://www.specflow.org/).
//      SpecFlow Version:3.9.0.0
//      SpecFlow Generator Version:3.9.0.0
// 
//      Changes to this file may cause incorrect behavior and will be lost if
//      the code is regenerated.
//  </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
#pragma warning disable
namespace AgicapAppCore.TransactionManagement.Tests.Acceptance.Specflow.Features.InMemoryComponentTest.Banking.InternalApiForPreAccounting

path:

C:\work\agicapapp\BoundedContexts\TransactionManagement\TM.Tests.Acceptance\Specflow\Features\InMemoryComponentTest\Banking\InternalApiForPreAccounting\FetchTransactions.feature.cs

Let me know if you need more info.

CarstenGruenzner commented 9 months ago

Hi,

here is a screen shot of my file header: image

I don't know if I'm allowed to disclose our file hierarchy. So I replaced parts with placeholders, sorry:

D:\\\..AcceptanceTest\Features\Experiment\Operations\Agitate

I hope that will help anyway.

Carsten

Socolin commented 9 months ago

What is the name of the feature too ?

Basically there is a piece of code that find the matching test based on the feature file, the feature name and the scenario name, with the generated code. In 2023.3 I change it to add a check on the namespace (it was only checking the scenario name and was leading to invalid match). So maybe the problem is there, but I don't see anything special that would cause a problem in the path you provided.

I'll check to add a log to see what is the actual namespace / class name the plugin is using to resolve your tests

CarstenGruenzner commented 9 months ago

Here is a screen shot: image

CarstenGruenzner commented 9 months ago

Hi,

any new on this topic, are there any additional information we can provide?

Carsten

Socolin commented 9 months ago

Can you try this version ? https://github.com/SpecFlowOSS/SpecFlow.Rider/actions/runs/7863820033

CarstenGruenzner commented 9 months ago

Hi. I installed this version and had a first look at it. My first impression is that the function is restored 👍, thank you very much. I'm going to test the version intensively in the next few days.

Carsten

Socolin commented 9 months ago

Can you also check the log if there is warning, it might help me fix the real problem and not rely on the fallback.

Something like Failed to find exact match for specflow

CarstenGruenzner commented 9 months ago

Hi, I found messages like this:

53387,71: 10:11:15.883 |W| SpecflowTestExplorer | JetPool(L) #2:60 | Failed to find exact match for specflow test between the file GherkinFile: Experiment_Create.feature and the class Experiment_CreateFeature in the namespace Lab_Experiments_AcceptanceTests.Features.Experiment.General. The class was found in the following namespaces: AutoChem.Lab.Experiments.AcceptanceTests.Features.Experiment.General I am a little surprised by the underscores in your lookup namespace.

Carsten

grant-dot-dev commented 8 months ago

Is there a fix for this ? It doesn't seem clear from the comments -> I don't wish to downgrade Rider in order to be able to run Specflow scenarios from the feature file. I've also found that the test explorer doesn't pick up feature tests either.

When should we expect a fix ? What is the cause of this issue ?

Socolin commented 7 months ago

Is there a fix for this ? It doesn't seem clear from the comments -> I don't wish to downgrade Rider in order to be able to run Specflow scenarios from the feature file. I've also found that the test explorer doesn't pick up feature tests either.

When should we expect a fix ? What is the cause of this issue ?

I think it's fixed already but I cannot publish update of the plugin, so use reqnroll plugin in 2024.1 and let me know if you still have a problem. (Disable specflow plugin first)

CarstenGruenzner commented 7 months ago

I just tried the reqnroll plugin with Rider 2024.1. Unfortunately it doesn't work for me. I cannot execute the test from the feature file. It is the same like in my initial post. Can you imagine a reason?

Nevertheless, the version in the link above still works with 2024.1 and I'll continue using it. Why can't you publish this version? Is this plugin discontinued?

Carsten

Socolin commented 7 months ago

I just tried the reqnroll plugin with Rider 2024.1. Unfortunately it doesn't work for me. I cannot execute the test from the feature file. It is the same like in my initial post. Can you imagine a reason?

I just notice I have the same problem so I'll try to check why and fix soon.

Nevertheless, the version in the link above still works with 2024.1 and I'll continue using it. Why can't you publish this version? Is this plugin discontinued?

214 for details, I cannot publish new update, because Tricentis did not declare the vendor status on Jetbrains website, and nobody is available to do it.

This plugin is very buggy with 2024.1 and you should switch to Reqnroll for the latest fix. Same code just the branding that changes.

LukaRukhadze commented 5 months ago

Any news about this one ? I have the same 2023.2 version were reqnroll is not available. I can't download 1.23.7 from the link cause it is expired and the latest version from the rider is 1.23.6.

Socolin commented 5 months ago

I cannot publish a new update, I would recommend you to upgrade to latest version of Rider, or to build the plugin yourself by cloning the repo and running ./gradlew :buildPlugin