test-mvc-razor-ui

Installation
SKILL.md

Test MVC / Razor UI (ABP)

ABP's Volo.Abp.AspNetCore.TestBase boots the real web app in-process so you can request pages/endpoints over HTTP and assert on the response. This is the ASP.NET Core web counterpart to the application-layer *TestBase chain.

When to Use

  • Requesting an MVC action or Razor page over HTTP and asserting on the HTML/JSON.
  • Verifying routing, an authenticated page, or an anonymous 302-to-login.

When Not to Use

  • Application services, domain services, repositories — use test-abp-applications (no web host needed).
  • Angular component tests — use test-angular-ui.
  • Configuring production hosting/middleware — use configure-production-hosting.

The test base

Subclass AbpWebApplicationFactoryIntegratedTest<TProgram> where TProgram is the SUT's Program entry-point class, not an ABP module. It gives you Client (an HttpClient with AllowAutoRedirect = false, so an unauthenticated request returns a 302, not the login page body), plus GetService<T> / GetRequiredService<T> / GetUrl<TController>().

Installs
14
GitHub Stars
32
First Seen
Sep 6, 2026