원클릭으로
planforge-new-test
Scaffold xUnit test classes with Arrange-Act-Assert, mock setup, proper naming conventions, and trait categories.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold xUnit test classes with Arrange-Act-Assert, mock setup, proper naming conventions, and trait categories.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Audit UI components for WCAG 2.2 compliance, semantic HTML, ARIA labels, keyboard navigation, color contrast, and responsive design.
Audit API endpoints for backward compatibility, versioning, OpenAPI compliance, pagination, rate limiting, and RFC 9457 error responses.
Review code for architecture violations: layer separation, sync-over-async, missing CancellationToken, improper DI. Use for PR reviews or code audits.
Fix a bug using TDD: reproduce with a failing test first, then implement the fix, then verify. Prevents regressions.
Review CI/CD pipelines for best practices: environment promotion, secrets management, rollback strategies, build caching, and deployment safety.
| name | planforge-new-test |
| description | Scaffold xUnit test classes with Arrange-Act-Assert, mock setup, proper naming conventions, and trait categories. |
| metadata | {"author":"plan-forge","source":".github/prompts/new-test.prompt.md"} |
Scaffold test classes following project conventions.
{MethodUnderTest}_When{Condition}_Should{ExpectedBehavior}
Examples:
CreateProduct_WhenNameIsNull_ShouldThrowValidationExceptionGetById_WhenNotFound_ShouldReturnNullCalculateTotal_WhenDiscountApplied_ShouldReturnReducedPricepublic class {ClassName}Tests
{
private readonly Mock<I{Dependency}> _mockDependency;
private readonly {ClassUnderTest} _sut; // System Under Test
public {ClassName}Tests()
{
_mockDependency = new Mock<I{Dependency}>();
_sut = new {ClassUnderTest}(_mockDependency.Object, NullLogger<{ClassUnderTest}>.Instance);
}
[Fact]
[Trait("Category", "Unit")]
public async Task Method_WhenCondition_ShouldExpected()
{
// Arrange
_mockDependency
.Setup(x => x.GetAsync(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(new EntityDto { Id = Guid.NewGuid() });
// Act
var result = await _sut.MethodAsync(Guid.NewGuid(), CancellationToken.None);
// Assert
result.Should().NotBeNull();
}
}
public class {ClassName}IntegrationTests : IAsyncLifetime
{
private readonly PostgreSqlContainer _postgres = new PostgreSqlBuilder()
.WithImage("postgres:16-alpine")
.Build();
public async Task InitializeAsync() => await _postgres.StartAsync();
public async Task DisposeAsync() => await _postgres.DisposeAsync();
[Fact]
[Trait("Category", "Integration")]
public async Task Repository_WhenInserted_ShouldBeRetrievable()
{
// Arrange — real DB connection
// Act — actual repository call
// Assert — verify round-trip
}
}
| Trait | When to Use |
|---|---|
[Trait("Category", "Unit")] | Pure unit tests with mocks |
[Trait("Category", "Integration")] | Tests hitting real DB |
[Trait("Category", "Smoke")] | Fast subset for PR validation |