bUnit-dev / bUnit

bUnit is a testing library for Blazor components that make tests look, feel, and runs like regular unit tests. bUnit makes it easy to render and control a component under test’s life-cycle, pass parameter and inject services into it, trigger event handlers, and verify the rendered markup from the component using a built-in semantic HTML comparer.
https://bunit.dev
MIT License
1.13k stars 104 forks source link

Verification against .NET 7 nightly failed #679

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago

The nightly build failed against the nightly .NET 7 SDK. Please investigate.

Additional information

dotnet --version: 7.0.100-preview.5.22307.18

linkdotnet commented 2 years ago

I tried to reproduce this locally (also with the preview nuget packages). Unfortunately I can't - everything is green :D For now maybe retriggering will solve the issue.

I thought about some improvements for the nightly job:

  1. Putting failing tests directly into this exact issue
  2. Also putting a list of all nuget packages and versions into the issue

Both can be achieved fairly okayish with medium effort. I fiddled around and got some kind of PoC, but unfortuantely the POC swallowed stderr completely so that the verification was always green even when we have failing unit tests.

The basic idea would be to use tee and some grep magic which we would pipe into an extra file and if the file has content we can enrich this very issue here. Would be fun to do, but the value is ... not that much, considering we can just go to the failing action and have all the information there.

PS: Got it working quite easily:

dotnet test ./tests/bunit.web.tests/bunit.web.tests.csproj -c release -f net7.0 > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)

Then we can check stderr.log and push it towards our template. Maybe remove some useless information. If this is soemthing viable for you @egil let me know. We can also have such mechanism on the main branch if wished.

egil commented 2 years ago

Good ideas, but as you say it's probably mostly nice to have territory, since we can just go and inspect the workflow logs. But if you are bored then don't hold back 😉

egil commented 2 years ago

Took a look at the output from the failed run. Seems like a whitespace/line ending mismatch, and not an actual failure for the test in question. Could be that the Blazor renderer adds different whitespace to the markup now compared to before.

It may be that if you try on Linux you see it as well on your machine (can try via WSL if you're on windows).

linkdotnet commented 2 years ago

Since 8 days it is consistent passing. I feel like we can close this and the Blazor team might have fixed the regression on their site (if there was any at all).

egil commented 2 years ago

Fixed issue with failing to complete due to trying to run bunit.web.testcomponents.