SpecFlowOSS / SpecFlow.VisualStudio

Visual Studio extension of SpecFlow (extracted from the main SpecFlow repo)
Other
67 stars 73 forks source link

Generate step definitions does not work #137

Open maysamms opened 5 years ago

maysamms commented 5 years ago

SpecFlow Version:

Used Test Runner

Version number: 3.12.0

Project Format of the SpecFlow project

.feature.cs files are generated using

Visual Studio Version

Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings

Are the latest Visual Studio updates installed?

.NET Framework:

Test Execution Method:

<SpecFlow> Section in app.config or content of specflow.json

  <appSettings>
    <add key="testProjectFolder" value="SpecFlowTests" />
  </appSettings>
<specFlow>
    <generator allowRowTests="false" />
</specFlow>

Project CS

<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
  <Import Project="..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.props" Condition="Exists('..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.props')" />
  <Import Project="..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.props" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.props')" />
  <Import Project="..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props')" />
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsP
  <Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.props'))" />
    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets'))" />
    <Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.props'))" />
    <Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.targets'))" />
    <Error Condition="!Exists('..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.props'))" />
    <Error Condition="!Exists('..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.targets'))" />
    <Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
  </Target>
  <Import Project="..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.4.0\build\net45\MSTest.TestAdapter.targets')" />
  <Import Project="..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.targets" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.220\build\SpecFlow.NUnit.targets')" />
  <Import Project="..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.targets" Condition="Exists('..\packages\SpecFlow.Tools.MsBuild.Generation.3.0.220\build\SpecFlow.Tools.MsBuild.Generation.targets')" />
  <Target Name="AfterUpdateFeatureFilesInProject">
    <!-- include any generated SpecFlow files in the compilation of the project if not included yet -->
    <ItemGroup>
      <Compile Include="**\*.feature.cs" Exclude="@(Compile)" />
    </ItemGroup>
  </Target>

Issue Description

I write the feature file, but when I right click and select the generation of step definition nothing happens.

Steps to Reproduce

  1. Right click and try to generate the step definition

Video presenting the error Project.zip

SabotageAndi commented 5 years ago

In the zip file is only a exe and not a video.

Please provide some screenshots about your issue.

maysamms commented 5 years ago

The exe is a video generated by screen2exe, follow the screenshot. In the image below, click the button to generate, but when I click do nothing. I have already tried to delete all the features of the project and recreate them, but that part still does not work Imagem

maysamms commented 5 years ago

This screen does not appear

Tela

SabotageAndi commented 5 years ago

About the exe: good to know. I simply don't execute exes that I get via GitHub issues from people I don't know. I am too much security paranoid to do that.

About your issue: From the screenshot it looks like, all your steps are already bound. So I think we don't open the dialog. If a step isn't bound, it would be displayed in violet.

maysamms commented 5 years ago

Creating new scenarios that has no links, it did not open the dialog screen. I was able to open it, but I had to return the extension of the VS to 2017.1.13... Tks