Toolverse
All skills

springboot-tdd

by affaan-m

Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
affaan-m
Category
Backend
Views
24

About this skill

Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.

How to use

  1. Zainstaluj skill springboot-tdd w swoim projekcie Spring Boot — upewnij się, że masz JUnit 5, Mockito, MockMvc i JaCoCo w zależnościach Maven lub Gradle.

  2. Zanim zaczniesz kodować nową funkcję lub endpoint, napisz test, który powinien się nie powieść. Użyj wzorca Arrange-Act-Assert: przygotuj dane, wykonaj akcję, sprawdź wynik.

  3. Dla testów logiki biznesowej (serwisów) stosuj @ExtendWith(MockitoExtension.class) z @Mock dla zależności i @InjectMocks dla testowanej klasy. Mockuj repozytoria i zewnętrzne serwisy, aby testy były szybkie i niezależne.

  4. Dla testów kontrolerów użyj @WebMvcTest z MockMvc — testuj endpointy bez uruchamiania pełnego kontekstu aplikacji. Sprawdzaj kody HTTP, strukturę JSON i wywołania serwisów.

  5. Dla testów integracyjnych (cała aplikacja, baza danych) użyj @SpringBootTest z @AutoConfigureMockMvc i @ActiveProfiles("test"). Tutaj rzeczywiście wołasz bazy danych (Testcontainers) i weryfikujesz pełny przepływ.

  6. Po każdym kroku uruchom JaCoCo, aby sprawdzić pokrycie testami — cel to minimum 80%. Refaktoryzuj kod tylko gdy wszystkie testy przechodzą (zielone).

Related skills

clickup

by civitai

Interact with ClickUp tasks and documents - get task details, view comments, create and manage tasks, create and edit docs. Use when working with ClickUp task/doc URLs or IDs.

Backend
2483

youtube-transcript

by michalparkola

Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.

Backend
53214

stripe-integration

by wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

Backend
40147

postgresql-psql

by timelessco

Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and

Backend
34173

fastapi-pro

by sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

Backend
54128

pdf-to-markdown

by aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions \

Backend
355664