getgauge / gauge-visualstudio

Visual Studio plugin for Gauge
10 stars 9 forks source link

dotnet core project in visual studio should discover tests and navigate from .spec files to code #251

Closed HariharanS closed 5 years ago

HariharanS commented 5 years ago

I am new to Gauge. Previously I was using other BDD tools. I am using the dotnet template. To start with, I ran the below command to initialize a gauge project. gauge init dotnet

This installs the default dotnet-template.csproj

Expected behavior

  1. I want to "Test explorer" to lists the tests so that I can run them individually
  2. I want to be able to navigate from the .spec file to the code implementation by right clicking and "Go to Definition" image

Actual behavior

  1. Test explorer window does not discover the tests
  2. Cannot navigate from .spec file to code behind

Steps to reproduce

  1. Run gauge init dotnet
  2. Open in visual studio
  3. Open Test Explorer window to discover tests but none are found
  4. Right click on a step in .spec file and choose Go to Definition does not navigate to step implementation

Version Information

VisualStudio Version and Edition :- image

Gauge VisualStudio Plugin Version :- image

image

HariharanS commented 5 years ago

quick additional note - if I use a csharp instead of dotnet template,

  1. when i navigate to test explorer, The tests are listed.
  2. I can run the tests
  3. I cannot debug the tests
  4. Go to definition on the step in .spec file takes me to the step implementation

image

zabil commented 5 years ago

Gauge's Visual Studio plugin only supports .net framework at the moment i.e gauge init csharp

To get similar (and better) features for .net core, guage init dotnet, please use VS Code

HariharanS commented 5 years ago

Thanks zabil for your reply. based on this comment https://github.com/getgauge/gauge-visualstudio/issues/251#issuecomment-478975561 there is still issue with debug tests in Visual studio

zabil commented 5 years ago

The screenshot shows breakpoints added to the specification. This is not supported. Have you tried adding breakpoints in the step implementation?