使用JUnit 5、Mockito、MockMvc、Testcontainers和JaCoCo进行Spring Boot的测试驱动开发。适用于添加功能、修复错误或重构时。
84
77%
Does it follow best practices?
Impact
92%
1.26xAverage score across 3 eval scenarios
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./docs/zh-CN/skills/springboot-tdd/SKILL.mdRepository layer testing with Testcontainers
@DataJpaTest annotation
100%
100%
AutoConfigureTestDatabase replace NONE
100%
100%
@Import TestContainersConfig
100%
100%
@DynamicPropertySource
0%
100%
Reusable container
0%
100%
AssertJ assertions
100%
100%
Arrange-Act-Assert structure
50%
100%
No partial mocks
100%
100%
Behavior not implementation
100%
100%
testing-approach.md documents annotations
100%
100%
Web layer controller testing with MockMvc
@WebMvcTest annotation
100%
100%
@MockBean for service
100%
100%
jsonPath assertions
100%
100%
Explicit stubs
100%
100%
AssertJ or status matchers
100%
100%
Arrange-Act-Assert structure
100%
100%
No full Spring context
100%
100%
404 not-found test
100%
100%
Behavior focus
100%
100%
test-design-notes.md mentions MockBean
100%
100%
Service unit tests, TDD workflow, and JaCoCo coverage setup
@ExtendWith(MockitoExtension.class)
0%
0%
@Mock and @InjectMocks usage
25%
50%
No partial mocks
100%
100%
@ParameterizedTest for variants
100%
100%
AssertJ assertThat
0%
100%
assertThatThrownBy for exceptions
0%
100%
Test data builder pattern
0%
0%
JaCoCo plugin version 0.8.14
0%
100%
JaCoCo prepare-agent and report goals
100%
100%
TDD workflow documented
100%
100%
Arrange-Act-Assert structure
50%
33%
mvn verify CI command
33%
100%
ae2cadd
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.