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

LivingDoc: Binding not found in assembly (NET 6) #2591

Open
ebwinters opened this issue Apr 30, 2022 · 17 comments
Open

LivingDoc: Binding not found in assembly (NET 6) #2591

ebwinters opened this issue Apr 30, 2022 · 17 comments
Labels

Comments

@ebwinters
Copy link

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:

  1. The tests run and pass (producing specflow output, showing bindings exists) using the exact test assembly specified above
  2. The TestExecutionJson file is generated in the directory where the livingdoc command is executed
    HOWEVER, when I try to generate living doc, I get 3 warnings:
  3. Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
  4. Warning: No bindings found in assembly '/package/unarchive/integrationtests.dll'
  5. 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

@goblinmaks
Copy link
Contributor

Hi @ebwinters,
Why you close this issue ?
Same issue reproduced for me. Do you have any workaround for it ?
image

Thanks,

@SabotageAndi
Copy link
Contributor

See my comment here: #2521 (comment)

It's not a real issue. Only the warning is annoying.

@ebwinters
Copy link
Author

@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

@goblinmaks
Copy link
Contributor

goblinmaks commented May 6, 2022

@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

image

@djvandijk
Copy link

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.

@SabotageAndi
Copy link
Contributor

@djvandijk Thanks for the info. Latest the next version to support the next version of SpecFlow will fix this issue.

@SabotageAndi SabotageAndi reopened this Jun 15, 2022
@goblinmaks
Copy link
Contributor

@SabotageAndi what of planned date to release new version of livingdoc will be released ?
Thanks,

@SabotageAndi
Copy link
Contributor

@goblinmaks No date planned. When we are finished, we release it.

@jrpc12
Copy link

jrpc12 commented Mar 3, 2023

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

image
image

my second project also with NET 6.0 throws only the warning and after that generate the livingdoc.html

image

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.

@filip-spasovski
Copy link

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

image

P.S. When I use it without the --binding-assemblies then the report is generated but I'm missing the Unused Step Definitions.

@NikkTod
Copy link

NikkTod commented Jun 24, 2023

Hello @SabotageAndi, any idea if the team will have time to fix this one, showing the unused steps is important for a clean house :)

@SabotageAndi
Copy link
Contributor

@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.

@goblinmaks
Copy link
Contributor

@SpecFlowOSS
@gasparnagy
@Socolin
Please leave any comment in case if anybody have any information about update.
Thanks,

@Socolin
Copy link
Contributor

Socolin commented Jul 7, 2023

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.

@gasparnagy
Copy link
Contributor

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.

@mikeblakeuk
Copy link

@SabotageAndi et al
Any news on this now .net 5.0 is basically dead?

@SabotageAndi
Copy link
Contributor

@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: #2719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants