AI Unified Process plugin for C# and Blazor on .NET 10
88
87%
Does it follow best practices?
Impact
93%
0.95xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Write end-to-end browser tests in native C# using Microsoft.Playwright.Xunit inside a dedicated E2E test project (*.Tests.E2E).
A diff of the specification change may follow the file path in the arguments. When it is there, it is the definitive list of what changed — work through it change by change. A removed line means the scenario it described was dropped: delete the tests that exist only for it instead of keeping them as passing extras.
Before writing new tests, look in the *.Tests.E2E project for an existing test class covering this
use case or test case (e.g. PlaceOrderE2ETest.cs, or any class referencing the UC-XXX / TC-XXX ID).
If one exists, update it to match the current specification instead of creating a second class:
docs/use_cases/UC-XXX-*.md or docs/test_cases/TC-XXX-*.md.Microsoft.Playwright.Xunit.PageTest.WebApplicationFactory<Program> or custom host fixture) to launch the app automatically on a dynamic port during test execution, or read base URL from configuration (https://localhost:5001).GetByRole, GetByLabel, GetByTestId) and async assertions (Expect(...).ToBeVisibleAsync()).namespace MyApp.Tests.E2E;
public class PlaceOrderE2ETest : PageTest
{
private readonly string _baseUrl;
public PlaceOrderE2ETest(TestServerFixture fixture)
{
_baseUrl = fixture.BaseUrl; // Dynamic test host URL or configuration
}
[Fact]
public async Task UserCanPlaceOrderSuccessfully()
{
await Page.GotoAsync($"{_baseUrl}/place-order");
await Page.GetByLabel("Quantity").FillAsync("2");
await Page.GetByRole(AriaRole.Button, new() { Name = "Submit Order" }).ClickAsync();
await Expect(Page.GetByText("Order Placed Successfully")).ToBeVisibleAsync();
}
}dotnet test to execute end-to-end tests against the application.