Warning: No feature files were discovered [Testing in local environment] [Solved]
Answered[Edit: solved. Please see my last post]
Hello,
I am currently experiencing an issue attempting to build a living doc while following the tutorial (https://docs.specflow.org/projects/getting-started/en/latest/GettingStarted/Step9.html) in order to create a living doc based on the output of my test results. I keep running into an issue where the living docs plugin is incapable of locating the Feature file.
I have seen this post, Warning: No feature files were discovered but unfortunately the fix doesn't seem to apply to my case.
Current development environment:
Visual studio 2022 on Windows 10
Library written in dotnet 6
Project structure :
Command used to generate living doc
- While at the root of the test project
etBuilder.Core.dll -t .\bin\Debug\net6.0\TestExecution.json
- While in the build output folder HistoricalMeasureBucketBuilder.Tests.Bdd\bin\Debug\net6.0
l -t TestExecution.json
I am able to see the living doc output but I get the message that no feature files were discovered and the output of the living doc resembles this
-
I would also like to add the contents of the TestExecution.json file
{
"Nodes": [],
"ExecutionTime": "2022-03-15T15:22:16.8009166Z",
"GenerationTime": "0001-01-01T00:00:00",
"PluginUserSpecFlowId": "13737a14-0b59-4eb2-8ae2-224bac2d6258",
"CLIUserSpecFlowId": null,
"ExecutionResults": [
{
"ContextType": "Scenario",
"FeatureFolderPath": "Features",
"FeatureTitle": "Calculator",
"ScenarioTitle": "Add two numbers",
"ScenarioArguments": [],
"Status": "OK",
"StepResults": [
{
"Duration": "00:00:00.0004921",
"Status": "OK",
"Error": null,
"Outputs": null
},
{
"Duration": "00:00:00.0000985",
"Status": "OK",
"Error": null,
"Outputs": null
},
{
"Duration": "00:00:00.0001815",
"Status": "OK",
"Error": null,
"Outputs": null
},
{
"Duration": "00:00:00.0125530",
"Status": "OK",
"Error": null,
"Outputs": null
}
],
"Outputs": null
}
],
"StepReports": null
}What I have also tried:
- I copied over the contents of my Features folder into my build output
- updated the FeatureFolderPath to use the actual path instead of relative path of the feature folder
Yet the issue remains.
-1 -
Please note, I have solved it. The primary issue was that I was pointing to a library's dll instead of the test library dll.
Instead of livingdoc test-assembly .\HistoricalMeasureBucketBuilder.Core.dll -t TestExecution.json
I used
livingdoc test-assembly .\HistoricalMeasureBucketBuilder.Tests.bdd.dll -t TestExecution.json
1
Please sign in to leave a comment.
Comments
2 comments