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

SpecFlowStepDefinitionReport fails with Required option 'p, ProjectFile' is missing as of Specflow 2.4.0 #2414

Open
cosminstirbu opened this issue Dec 25, 2018 · 0 comments

Comments

@cosminstirbu
Copy link

What You Are Seeing?

When I invoke SpecFlowStepDefinitionReport similar to the snippet below:

Task("SpecflowStepDefinitionReport")
.Does(() => {
    var outputHtml = $"{Environment.CurrentDirectory}/SpecFlowStepDefinitionReport.html";
    var reportingSettings = new SpecFlowStepDefinitionReportSettings 
    { 
        BinFolder = $"{Environment.CurrentDirectory}/{ParseProjectName(Projects.AcceptanceTests)}/bin/Debug",
        Out = outputHtml
    };
    SpecFlowStepDefinitionReport(Projects.AcceptanceTests, reportingSettings);

    var htmlContents = FileReadText(outputHtml);

    if (htmlContents.Contains("<tr class=\"noInstances\">"))
    {
        throw new CakeException($"Step definition is not present in any feature file. Please see {outputHtml}");
    }
    else if (htmlContents.Contains("<tr class=\"noBinding\">"))
    {
        throw new CakeException($"Scenario step is not defined (implemented). Please see {outputHtml}");
    }
});

It fails with the following error:

========================================
SpecflowStepDefinitionReport
========================================
Executing task: SpecflowStepDefinitionReport
Executing: /Users/cosminstirbu/Desktop/MyProject/tools/SpecFlow.2.4.1/tools/specflow.exe stepdefinitionreport "/Users/cosminstirbu/Desktop/MyProject/MyProject.AcceptanceTests/MyProject.AcceptanceTests.csproj" /binFolder:"/Users/cosminstirbu/Desktop/MyProject/MyProject.AcceptanceTests/bin/Debug" /out:"/Users/cosminstirbu/Desktop/MyProject/SpecFlowStepDefinitionReport.html"
TechTalk.SpecFlow 2.4.0-line-v2-4.52+Branch.line-v2.4.Sha.44ea7423c9bf4972a8b63427a0ab319654bb416e
Copyright © TechTalk 2011
ERROR(S):
Required option 'p, ProjectFile' is missing.

  -x, --XsltFile       Xslt file to use, defaults to built-in stylesheet if not provided.

  -b, --binFolder      (Default: bin\Debug) Path for Spec dll e.g. Company.Specs.dll. Defaults to bin\Debug.

  -o, --OutputFile     (Default: TestResult.html) Generated Output File. Defaults to TestResult.html

  -d, --debug          Used for tool integration.

  -p, --ProjectFile    Required. Visual Studio Project File containing specs.

  --help               Display this help screen.

  --version            Display version information.

This started happening since upgrading Specflow to 2.4.0, and I assume it is caused by SpecFlowOSS/SpecFlow#1112

What is Expected?

It should work just as it used to work before 2.4.0 (e.g. 2.3.2)

What version of Cake are you using?

0.26.0 / 0.31.0

Are you running on a 32 or 64 bit system?

64

What environment are you running on? Windows? Linux? Mac?

macOS

Are you running on a CI Server? If so, which one?

Local and on CI

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

1 participant