ワンクリックで
integration-testing
Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | integration-testing |
| description | Guidelines for cross-layer testing (Hooks + UI + Services) using real logic and MSW for network interception. |
This skill defines how to implement and organize integration tests that validate the interaction between Endpoints, Services, and the Database.
Unlike unit tests that mock dependencies, integration tests in FinanzApp Backend use:
WebAPI/Endpoints/ are executed via HttpClient.Services/ is executed fully.Moq or a mock server (like WireMock.Net) to intercept external calls (CoinGecko, Yahoo Finance).All integration tests MUST be located in the global tests directory:
Tests/Integration/[Module]/[Feature]IntegrationTests.csMoq while keeping core internal logic untouched.AuthenticationHandler or a test JWT generator to simulate authenticated requests.// Tests/Integration/Auth/LoginFlowTests.cs
[Fact]
public async Task Login_ValidCredentials_ReturnsTokenAndUser()
{
// 1. Arrange: Prepare client and mock dependencies if needed
var client = _factory.CreateClient();
var loginDto = new LoginDto { Email = "test@example.com", Password = "Password123" };
// 2. Act: Call the real API endpoint
var response = await client.PostAsJsonAsync("/api/auth/login", loginDto);
// 3. Assert: Verify status code and content
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<LoginResultDto>();
Assert.NotNull(result.Token);
Assert.Equal("Agus", result.User.Name);
}
Mandatory rule requiring a corresponding test file for every business logic file and UI component.
Guidelines for naming test folders and namespaces following the Unit.[Component] convention.
Catalog of all specialized skills used across the FinanzApp project (Frontend & Backend).
Guidelines for clean code, readability, and the "No Comments" policy.
Mandatory rule for EF Core migrations and database updates.
Mandatory rules for automatically updating README.md when creating files or tests.