Migrate IdentityServer.EndToEndTests to xUnit v3

- Add [assembly: CaptureConsole]
- Remove ITestOutputHelper constructor injection (base class uses TestContext.Current)
- Remove Xunit.Abstractions namespace usage
- Remove unused packages: Serilog.Sinks.XUnit, Xunit.SkippableFact, Microsoft.Playwright.Xunit
This commit is contained in:
Damian Hickey 2026-02-18 10:10:00 +01:00
parent f728e95a6a
commit 7cec4fe081
4 changed files with 8 additions and 9 deletions

View file

@ -0,0 +1,4 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.
[assembly: CaptureConsole]

View file

@ -12,11 +12,8 @@
<PackageReference Include="Serilog" />
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.TextWriter" />
<PackageReference Include="Serilog.Sinks.XUnit" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Aspire.Hosting.Testing" />
<PackageReference Include="Xunit.SkippableFact" />
<PackageReference Include="Microsoft.Playwright.Xunit" />
</ItemGroup>
<ItemGroup>

View file

@ -5,13 +5,12 @@ using Duende.IdentityServer.EndToEndTests.TestInfra;
using Duende.Xunit.Playwright;
using Projects;
using ServiceDefaults;
using Xunit.Abstractions;
namespace Duende.IdentityServer.EndToEndTests;
[Collection(IdentityServerAppHostCollection.CollectionName)]
public class IdentityServerTests(ITestOutputHelper output, IdentityServerHostTestFixture fixture)
: PlaywrightTestBase<All>(output, fixture)
public class IdentityServerTests(IdentityServerHostTestFixture fixture)
: PlaywrightTestBase<All>(fixture)
{
[Theory]
[InlineData(AppHostServices.MvcAutomaticTokenManagement)]

View file

@ -3,10 +3,9 @@
using Duende.Xunit.Playwright;
using Projects;
using Xunit.Abstractions;
namespace Duende.IdentityServer.EndToEndTests.TestInfra;
[Collection(IdentityServerAppHostCollection.CollectionName)]
public class IdentityServerPlaywrightTestBase(ITestOutputHelper output, AppHostFixture<All> fixture)
: PlaywrightTestBase<All>(output, fixture);
public class IdentityServerPlaywrightTestBase(AppHostFixture<All> fixture)
: PlaywrightTestBase<All>(fixture);