Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/Testing & QA
affaan-m avatar

Springboot Tdd

affaan-m/everything-claude-code

A solid TDD scaffold for Spring Boot that actually enforces the discipline with JaCoCo coverage gates and gives you the full testing stack: JUnit 5 for units, MockMvc for controllers, Testcontainers for persistence. The workflow is classic red-green-refactor with concrete examples for each layer, from mocked services to full integration tests hitting a real Postgres container. It pushes you toward AssertJ assertions and test data builders, which keeps things readable. Use this when you want guardrails that make it harder to skip tests or ship undertested code. The 80% coverage threshold isn't negotiable, which is either discipline or annoying depending on your project phase.

installs
6K
GitHub stars
229.1K
last updated
Jul 14, 2026
View on GitHubSave

Install

$ npx -y skills add affaan-m/everything-claude-code --skill springboot-tdd --agent claude-code

Installs into .claude/skills of the current project.

Files

Spring Boot TDD Workflow

TDD guidance for Spring Boot services with 80%+ coverage (unit + integration).

When to Use

  • New features or endpoints
  • Bug fixes or refactors
  • Adding data access logic or security rules

Workflow

  1. Write tests first (they should fail)
  2. Implement minimal code to pass
  3. Refactor with tests green
  4. Enforce coverage (JaCoCo)

Unit Tests (JUnit 5 + Mockito)

@ExtendWith(MockitoExtension.class)
class MarketServiceTest {
  @Mock MarketRepository repo;
  @InjectMocks MarketService service;

  @Test
  void createsMarket() {
    CreateMarketRequest req = new CreateMarketRequest("name", "desc", Instant.now(), List.of("cat"));
    when(repo.save(any())).thenAnswer(inv -> inv.getArgument(0));

    Market result = service.create(req);

    assertThat(result.name()).isEqualTo("name");
    verify(repo).save(any());
  }
}

Patterns:

  • Arrange-Act-Assert
  • Avoid partial mocks; prefer explicit stubbing
  • Use @ParameterizedTest for variants

Web Layer Tests (MockMvc)

@WebMvcTest(MarketController.class)
class MarketControllerTest {
  @Autowired MockMvc mockMvc;
  @MockBean MarketService marketService;

  @Test
  void returnsMarkets() throws Exception {
    when(marketService.list(any())).thenReturn(Page.empty());

    mockMvc.perform(get("/api/markets"))
        .andExpect(status().isOk())
        .andExpect(jsonPath("$.content").isArray());
  }
}

Integration Tests (SpringBootTest)

@SpringBootTest
@AutoConfigureMockMvc
@ActiveProfiles("test")
class MarketIntegrationTest {
  @Autowired MockMvc mockMvc;

  @Test
  void createsMarket() throws Exception {
    mockMvc.perform(post("/api/markets")
        .contentType(MediaType.APPLICATION_JSON)
        .content("""
          {"name":"Test","description":"Desc","endDate":"2030-01-01T00:00:00Z","categories":["general"]}
        """))
      .andExpect(status().isCreated());
  }
}

Persistence Tests (DataJpaTest)

@DataJpaTest
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
@Import(TestContainersConfig.class)
class MarketRepositoryTest {
  @Autowired MarketRepository repo;

  @Test
  void savesAndFinds() {
    MarketEntity entity = new MarketEntity();
    entity.setName("Test");
    repo.save(entity);

    Optional<MarketEntity> found = repo.findByName("Test");
    assertThat(found).isPresent();
  }
}

Testcontainers

  • Use reusable containers for Postgres/Redis to mirror production
  • Wire via @DynamicPropertySource to inject JDBC URLs into Spring context

Coverage (JaCoCo)

Maven snippet:

<plugin>
  <groupId>org.jacoco</groupId>
  <artifactId>jacoco-maven-plugin</artifactId>
  <version>0.8.14</version>
  <executions>
    <execution>
      <goals><goal>prepare-agent</goal></goals>
    </execution>
    <execution>
      <id>report</id>
      <phase>verify</phase>
      <goals><goal>report</goal></goals>
    </execution>
  </executions>
</plugin>

Assertions

  • Prefer AssertJ (assertThat) for readability
  • For JSON responses, use jsonPath
  • For exceptions: assertThatThrownBy(...)

Test Data Builders

class MarketBuilder {
  private String name = "Test";
  MarketBuilder withName(String name) { this.name = name; return this; }
  Market build() { return new Market(null, name, MarketStatus.ACTIVE); }
}

CI Commands

  • Maven: mvn -T 4 test or mvn verify
  • Gradle: ./gradlew test jacocoTestReport

Remember: Keep tests fast, isolated, and deterministic. Test behavior, not implementation details.

SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/affaan-m/everything-claude-code
Categories
Testing & QA, Java & JVM

More from affaan-m/everything-claude-code

All 256
  • Continuous Learning5.9K
  • Database Migrations5.9K
  • Django Tdd5.9K
  • E2e Testing5.9K
  • Liquid Glass Design5.9K
  • Security Scan5.9K
  • Deployment Patterns5.8K
  • Jpa Patterns5.8K
  • Laravel Patterns5.8K
  • Clickhouse Io5.7K
  • Eval Harness5.7K
  • Laravel Security5.7K
  • Cpp Testing5.6K
  • Iterative Retrieval5.6K
  • Agent Harness Construction5.5K
  • Configure Ecc5.5K
  • Nutrient Document Processing5.5K
  • Search First5.5K
  • Verification Loop5.5K
  • Agentic Engineering5.4K
  • Cost Aware Llm Pipeline5.4K
  • Django Verification5.4K
  • Springboot Verification5.4K
  • Codebase Onboarding5.3K

Recommended

More Testing & QA
1vinvcn avatartddvinvcn/mattpocock-skills-zh-cn测试驱动开发。适用于用户想用先写测试的方式构建功能或修复缺陷、提到 “red-green-refactor”,或需要集成测试时。5.9Kinstalls
2affaan-m avatardjango-tddaffaan-m/everything-claude-codedjango tdd5.9Kinstalls
3affaan-m avatarcpp-testingaffaan-m/everything-claude-codecpp testing5.6Kinstalls
4openai avatarplaywright-interactiveopenai/skillsPersistent browser and Electron interaction through `js_repl` for fast iterative UI debugging.5.5Kinstalls
5trailofbits avatarcoverage-analysistrailofbits/skillsCoverage analysis measures code exercised during fuzzing. Use when assessing harness effectiveness or identifying fuzzing blockers.5.5Kinstalls
6affaan-m avatarrust-testingaffaan-m/everything-claude-coderust testing5.3Kinstalls