بنقرة واحدة
servicestack-testing
Tests services using ServiceStack’s testing utilities and in-memory hosts.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Tests services using ServiceStack’s testing utilities and in-memory hosts.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Designs stable, discoverable APIs using routes, metadata, and versioning conventions.
Implements authentication using ServiceStack Auth Providers and session handling.
Applies role-, permission-, and ownership-based authorization using ServiceStack idioms.
Implements AutoQuery services, custom filters, and permission-aware querying.
Designs request/response DTOs using DTO-first, message-based ServiceStack conventions.
Controls OpenAPI / metadata exposure without compromising ServiceStack-first design.
| name | servicestack-testing |
| description | Tests services using ServiceStack’s testing utilities and in-memory hosts. |
ServiceStack provides excellent support for both unit and integration testing.
Service class.var service = new MyService { Db = dbFactory.Open() };
var response = service.Any(new MyRequest { ... });
Assert.That(response.Result, Is.EqualTo("Expected"));
BasicAppHost or InMemoryAppHost for light integration tests.AppHost (self-hosted or TestServer) for end-to-end tests with typed clients.public class MyIntegrationTest : ServiceStackTestBase
{
public MyIntegrationTest()
{
ConfigureAppHost(new AppHost());
}
[Test]
public void Can_call_service()
{
var client = CreateClient();
var response = client.Get(new MyRequest { ... });
// ... assertions
}
}
ServiceStack is designed for easy DI, so you can easily swap real implementations with mocks (e.g., Moq, NSubstitute) in your AppHost configuration during tests.
AppHost configuration for related integration tests.