SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

VsTest/Azure DevOps - Specflow+ Runner Test Standard Output logs individual characters #2543

Open bethly-hallows opened 2 years ago

bethly-hallows commented 2 years ago

SpecFlow Version

3.9

Which test runner are you using?

SpecFlow+ Runner

Test Runner Version Number

3.9

.NET Implementation

.NET Core 3.1

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

TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK

SpecFlow Section in app.config or content of specflow.json

{ "bindingCulture": { "language": "en-us" }, "language": { "feature": "en-us" }, "livingDocGenerator": { "enabled": true, "filePath": "TestExecution.json" }, "stepAssemblies": [ { "assembly": "Helper" } ] }

Issue Description

I am attempting to get my Specflow tests running on a VSTest task in Azure Devops. Everything seems to be going smoothly so far, I can see that the task picks up all of my tests from my .dll, and finds the very first test, and begins to process it. At this point, the test completes in the background (which I can see in my local logging as these are API tests), but the VSTest task does not see this.

Instead, the task will continue to run for a long time. I cancelled it, and went to view the logs: image

Here, I can see the task is somehow writing every single character from my Specflow Test Output as an individual thread item. I can see when I compared my test output from Visual Studio that this is the exact same text: image

In the mean time, I can see in the actual Azure Devops task logs that it did seemingly TRY to run my test (and failed) which is fine, but it was another 2 hours until the next test started again (this screenshot is from another attempt hence varying timestamps from above screenshots): image

I have no idea how or why the VSTest task would behave this way, I can't see anything obvious that relates to logging, and I wouldn't expect the task to behave this way.

Steps to Reproduce

Here is my VSTest task and Release pipeline set up:

image image

Link to Repro Project

No response