SpecFlow
SpecFlow copied to clipboard
LivingDoc: Binding not found in assembly (NET 6)
SpecFlow Version
3.9.57
Which test runner are you using?
xUnit
Test Runner Version Number
SpecFlow.xUnit: Version="3.9.58"
.NET Implementation
.NET 5.0
Project Format of the SpecFlow project
Sdk-style project format
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Command line – PLEASE SPECIFY THE FULL COMMAND LINE
SpecFlow Section in app.config or content of specflow.json
{
"$schema": "https://specflow.org/specflow-config.json",
"livingDocGenerator": {
"enabled": true,
"filePath": "TestExecution.json"
}
}
Issue Description
I am running livingdoc (most up to date version) in command line to generate html using the following:
~/.dotnet/tools/livingdoc test-assembly /package/unarchive/integrationtests.dll --test-execution-json TestExecution.json --output report.html --title Test
I have verified that:
- The tests run and pass (producing specflow output, showing bindings exists) using the exact test assembly specified above
- The
TestExecutionJson
file is generated in the directory where thelivingdoc
command is executed HOWEVER, when I try to generate living doc, I get 3 warnings: -
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
-
Warning: No bindings found in assembly '/package/unarchive/integrationtests.dll'
- In the html document that is generated, which has greyed out features, but all of the correct feature data showing it read the test assembly or the json file correctly, has at the top:
Warning: The given test results could not be fully matched to the feature files. Please make sure that the correct locations were defined.
I cannot figure out why this is happening. I want to see test results with my features, but it will not work. I have read the documentation many times over.
Steps to Reproduce
COMMAND LINE: dotnet test "/package/unarchive/integrationtests.dll" --logger "console;verbosity=detailed"
Link to Repro Project
No response
Hi @ebwinters,
Why you close this issue ?
Same issue reproduced for me. Do you have any workaround for it ?
Thanks,
See my comment here: https://github.com/SpecFlowOSS/SpecFlow/issues/2521#issuecomment-976419929
It's not a real issue. Only the warning is annoying.
@goblinmaks my features files were in the wrong place. I was creating a ZIP on windows and running on linux, so the unarchive had paths like /home/package\x\y\z. This issue was irrelevant to Specflow
@SabotageAndi Ok, but I want to get unused step definitions with livingdoc cli tool livingdoc --version Framework: .NET 5.0.16 3.9.57+gcf5c4dd9b9
livingdoc test-assembly .\TA.UI.ATO.Features.dll --binding-assemblies .\TA.UI.Steps.dll
all my project use net6 and get error, when I back my projects to net5 it works and generate report correctly
See my comment here: #2521 (comment)
It's not a real issue. Only the warning is annoying.
It IS an issue. Can confirm we run into the same issue. When using a .NET6 test assembly livingdoc cannot find the bindings. The report gets generated, but without the 'Unused Step Definitions' analytics. There it states again 'No step definitions were found in the provided assemblies'. That's a real shame since finding unused steps is one of the main reason why I'm currently looking into livingdoc.
@djvandijk Thanks for the info. Latest the next version to support the next version of SpecFlow will fix this issue.
@SabotageAndi what of planned date to release new version of livingdoc will be released ? Thanks,
@goblinmaks No date planned. When we are finished, we release it.
Just to confirm that is a real issue and is not isolated,
This happens to me, I wonder if you guys have replicated, I have two separated projects with NET 6.0
livingdoc test-assembly project1.dll -t TestExecution.json throws the same error and not livingdoc.html generated
my second project also with NET 6.0 throws only the warning and after that generate the livingdoc.html
the only differences I can says is the in the project where the error occurs, I have more nuget packages, but after includ in the project2 where livingdoc work, the html still generated but not in the first project, something is causing the error but I'm not sure the entire reason is NET 6.0 since both project use it.
I'm getting a similar error and a warning. I use the following command
livingdoc feature-folder C:\GitRepos\SolutionFolder\SpecFlowProjectFolder --binding-assemblies C:\GitRepos\SolutionFolder\SpecFlowProjectFolder\bin\Release\net48\SpecFlowProject.dll -t C:\GitRepos\SolutionFolder\SpecFlowProjectFolder\bin\Release\net48\TestExecution.json --output C:\GitRepos\SolutionFolder\SpecFlowProjectFolder\TestResults\ReportTests.html
I get the following errors
P.S. When I use it without the --binding-assemblies
then the report is generated but I'm missing the Unused Step Definitions.
Hello @SabotageAndi, any idea if the team will have time to fix this one, showing the unused steps is important for a clean house :)
@NikkTod I don't work for Tricentis since March and so I don't work on SpecFlow anymore. I have no idea when somebody will do anything on SpecFlow.
@SpecFlowOSS @gasparnagy @Socolin Please leave any comment in case if anybody have any information about update. Thanks,
I'm only maintaining the rider plugin on my free time for a while now. I don't know anything about the state of SpecFlow project, it seems nobody is working actively on it right now. I'm also waiting after a new release.
If someone have some info I'm interested in them.
Same here. Last year I helped Tricentis in the SpecFlow maintenance, but my contract was not renewed for this year and I haven't got any feedback from them about the plans.
@SabotageAndi et al Any news on this now .net 5.0 is basically dead?
@mikeblakeuk I am not involved with SpecFlow and Tricentis in any way at the moment. I left Tricentis in February.
It all depends on what @gasparnagy achieves with Tricentis. Status Issue for that is here: https://github.com/SpecFlowOSS/SpecFlow/issues/2719