Test assembly .dll files, specflow.json or App.config do not exist in project with Specflow
AnsweredI am trying to setup SpecFlow LivingDoc+ with test results in Azure Devops.
Project already uses Specflow and was created as .NET 6 project
- Project info:
- C#
- Unit testing (NuGet packages installed): MSTest, Xunit
- Existing tests run fine via VS Test Explorer
- Specflow is installed and all existing Features already use it
- Feature files are under project name/test/Features
- Test assembly .dll file does not exist
- specflow.json (or App.config) do not exist in the project
Is there a way for me to generate or create test assembly dll files and specflow.json manually so I can generate LivingDoc?
I have done the following:
Add NuGet Packages
- CMD:
- CD to root of the project
- dotnet add package SpecFlow.Plus.LivingDocPlugin
- Manage NuGet packages > SpecFlow.Plus.LivingDocPlugin > install for all project paths with Integration, UI, and E2E tests
- Also Specflow packages for the rest of the test frameworks
Install CLI tool
- CMD:
- dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
- dotnet tool update --global SpecFlow.Plus.LivingDoc.CLI
- VS Main Menu > Build > Rebuild Solution
- Test Explorer > Run all tests
-
The Test Assembly is created when you build the project. It is the output assembly of the project.
specflow.json/app.config is not needed for SpecFlow+ LivingDoc. You want to get the TestExecution.json which gets generated when you run the tests.
Aren't they generated after you have run your tests?
I am not exactly sure which issue you have at the moment.
0 -
Hi Andreas Willich no, the TestExecution.json is not generated after test run, I searched the entire project structure.
What can I check on my side to troubleshoot why it doesn't generate?0 -
This is now resolved, TestExecution.json was not displaying when searching inside IDE, but I found it manually.
LivingDoc html now generates fine on my Desktop when using the standard command:livingdoc test-assembly C:\path\Application\bin\Debug\net6.0\Application.dll -t C:\path\Application\bin\Debug\net6.0\TestExecution.json --output C:\Users\Petar\Desktop
0
Please sign in to leave a comment.
Comments
3 comments