SpecFlow "Create Test Definition Definition" is missing in VS2015

I am testing VS2015 and writing SpecFlow special files. When I right click on the file, I cannot find the Generate Test Definitions context menu. This only happens in the "Class Library (Package)", which is obviously the DNX 5.0 library.

Here is my project.json:

{
    "version": "1.0.0-*",
    "description": "",
    "authors": [ "" ],
    "tags": [ "" ],
    "projectUrl": "",
    "licenseUrl": "",

    "dependencies": {
        "SpecFlow": "1.9.0",
        "SpecFlow.xUnit": "1.0.2",
        "xunit": "2.1.0-beta3-build3029",
        "xunit.extensions": "2.0.0"
    },

    "frameworks": {
        "dnx451": { },
        "dnxcore50": {
        "dependencies": {
            "System.Collections": "4.0.10-beta-22816",
            "System.Linq": "4.0.0-beta-22816",
            "System.Threading": "4.0.10-beta-22816",
            "Microsoft.CSharp": "4.0.0-beta-22816"
        }
    }
}

      

And I added the Visual Studio 2015 SpecFlow extensions.

Did I miss something?

But if I try the same in a normal class library that works great.

+3


source to share


3 answers


I would suggest that SpecFlow is only supported in desktop DotNet applications, the dnx format is too large or unstable to be fully supported.

Looking at http://www.specflow.org/documentation/Visual-Studio-2015-Integration/ you will find out that this integration may not be complete. (I note that NuGet said the same thing just a few months ago http://blog.nuget.org/20150331/nuget-2.8.5.html ).



Sorry, this is all speculation.

You might want to raise this as an issue with them, https://github.com/techtalk/SpecFlow/issues .

+4


source


I found this little gem to provide a nice bridge until Specflow handles this issue:

https://github.com/stajs/SpecFlow.Dnx



Be sure to read the ReadMe file!

+4


source


In the SpecFlow documentation:

Right-click the specification project (for example, MyProject.Specs) and select Manage NuGet Packages for Solution. Find "SpecRun" and install SpecRun.SpecFlow.

I took these steps and got the Create Step Definition button. :)

0


source







All Articles