使用JUnit 5、Mockito、MockMvc、Testcontainers和JaCoCo进行Spring Boot的测试驱动开发。适用于添加功能、修复错误或重构时。
80
71%
Does it follow best practices?
Impact
96%
1.31xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./docs/zh-CN/skills/springboot-tdd/SKILL.mdTDD unit testing with Mockito
Test-first evidence
100%
100%
MockitoExtension
100%
100%
Mock + InjectMocks
50%
100%
AAA structure
50%
62%
No partial mocks
100%
100%
Explicit stubs
62%
100%
ParameterizedTest
100%
100%
AssertJ assertThat
0%
100%
assertThatThrownBy
0%
100%
Test data builder
0%
0%
verify() usage
100%
100%
Web layer and integration testing
WebMvcTest annotation
100%
100%
MockBean for service
100%
100%
MockMvc injection
100%
100%
MockMvc perform
100%
100%
jsonPath assertions
100%
100%
SpringBootTest annotation
100%
100%
AutoConfigureMockMvc
100%
100%
ActiveProfiles test
0%
100%
Status matchers
100%
100%
Separate test classes
100%
100%
AssertJ or jsonPath only
100%
100%
Persistence testing with Testcontainers and JaCoCo
DataJpaTest annotation
100%
100%
No DB replacement
100%
100%
Import TestContainersConfig
100%
100%
TestContainersConfig class
100%
100%
Reusable container
0%
100%
DynamicPropertySource
0%
100%
JaCoCo plugin declared
100%
100%
JaCoCo version 0.8.14
0%
100%
JaCoCo prepare-agent goal
100%
100%
JaCoCo report at verify
100%
100%
AssertJ in repo tests
100%
100%
e04ea0b
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.