Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate step definitions does not work #137

Open
8 of 32 tasks
maysamms opened this issue Jun 6, 2019 · 5 comments
Open
8 of 32 tasks

Generate step definitions does not work #137

maysamms opened this issue Jun 6, 2019 · 5 comments

Comments

@maysamms
Copy link

maysamms commented Jun 6, 2019

SpecFlow Version:

  • 3.0
  • 2.4
  • 2.3
  • 2.2
  • 2.1
  • 2.0
  • 1.9

Used Test Runner

  • SpecFlow+Runner
  • MSTest
  • NUnit
  • Xunit

Version number: 3.12.0

Project Format of the SpecFlow project

  • Classic project format using packages.config
  • Classic project format using <PackageReference> tags
  • Sdk-style project format

.feature.cs files are generated using

  • SpecFlow.Tools.MsBuild.Generation NuGet package
  • SpecFlowSingleFileGenerator custom tool

Visual Studio Version

  • VS 2019
  • VS 2017
  • VS 2015

Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings

  • Enabled
  • Disabled

Are the latest Visual Studio updates installed?

  • Yes
  • No

.NET Framework:

  • >= .NET 4.5
  • before .NET 4.5
  • .NET Core 2.0
  • .NET Core 2.1
  • .NET Core 2.2
  • .NET Core 3.0

Test Execution Method:

  • Visual Studio Test Explorer
  • TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
  • Command line – PLEASE SPECIFY THE FULL COMMAND LINE

<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
Copy link
Contributor

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

Please provide some screenshots about your issue.

@maysamms
Copy link
Author

maysamms commented Jun 7, 2019

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
Copy link
Author

maysamms commented Jun 7, 2019

This screen does not appear

Tela

@SabotageAndi
Copy link
Contributor

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
Copy link
Author

maysamms commented Jun 8, 2019

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

@SabotageAndi SabotageAndi transferred this issue from SpecFlowOSS/SpecFlow Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants