Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

322-frameworks-spring-boot-testing-integration-tests

/322-frameworks-spring-boot-testing-integration-tests

Pisze i poprawia testy integracyjne Spring Boot z Testcontainers, izolacją danych i testami HTTP.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Pisze i poprawia testy integracyjne Spring Boot z Testcontainers, izolacją danych i testami HTTP.

Oryginalny opis (EN)

Use when you need to write or improve integration tests — including Testcontainers with @ServiceConnection, @DataJdbcTest persistence slices, TestRestTemplate or MockMvcTester for HTTP, data isolation, and container lifecycle management for Spring Boot 4.0.x. This should trigger for requests such as Review Java code for Spring Boot integration tests; Apply best practices for Spring Boot integration tests in Java code; Write @SpringBootTest integration tests with Testcontainers; Configure dynamic properties for Spring integration tests; Review Spring Boot integration test profiles. Part of Plin

Jak działa

  1. Constraints
  2. When to use this skill
  3. Workflow
  4. Reference
Sekcje z nagłówków SKILL.md, w oryginale · 60 linii, 384 słów
Podgląd SKILL.md
---
name: 322-frameworks-spring-boot-testing-integration-tests
description: Use when you need to write or improve integration tests — including Testcontainers with @ServiceConnection, @DataJdbcTest persistence slices, TestRestTemplate or MockMvcTester for HTTP, data isolation, and container lifecycle management for Spring Boot 4.0.x. This should trigger for requests such as Review Java code for Spring Boot integration tests; Apply best practices for Spring Boot integration tests in Java code; Write @SpringBootTest integration tests with Testcontainers; Configure dynamic properties for Spring integration tests; Review Spring Boot integration test profiles. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Spring Boot Integration Testing

Apply Spring Boot integration testing guidelines for Spring Boot 4.0.x.

**What is covered in this Skill?**

- Integration test scope and purpose (verify wiring and contracts, not unit-test duplication)
- Testcontainers with @ServiceConnection for zero-config wiring (preferred)
- @DynamicPropertySource as fallback for containers without built-in service connection support
- Static @Container instances shared across test methods for performance
- MockMvcTester for fluent AssertJ-based HTTP assertions (Spring Boot 4.0.x)
- TestRestTemplate for full HTTP stack testing
- @DataJdbcTest / @DataJpaTest persistence slices (load only persistence layer, start faster)
- Data isolation: each test owns its scenario; no shared mutable state or ordering assumptions
- @MockitoBean for mock registration (Spring Boot 4.0.x — @MockBean removed)
- Resource lifecycle: Testcontainers JUnit integration for teardown; *IT / integration test separation

**Scope:** Apply recommendations based on the reference rules and good/bad code examples.

## Constraints

Before applying any integration test changes, ensure the project compiles. If compilation fails, stop immediately. After applying improvements, run full verification.

- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change
- **SAFETY**: If compilation fails, stop immediately
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements
- **BEFORE APPLYING**: Read the reference for detailed rules and good/bad patterns
- **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes
- **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance

## When to use this skill

- Review Java code for Spring Boot integration tests
- Apply best practices for Spring Boot integration tests in Java code
- Write @SpringBootTest integration tests with Testcontainers
- Configure dynamic properties for Spring integration tests
- Review Spring Boot integration test profiles

## Workflow

1. **Read reference and assess project context**

Read `references/322-frameworks-spring-boot-testing-integration-tests.md` and inspect the current project setup before proposing changes.

2. **Gather scope and decide target improvements**

Identify requested outcomes, constraints, and the minimum safe set of changes to apply.

3. **Apply framework-aligned changes**

Implement or refactor configuration/code following the reference patterns and project conventions.

4. **Run verification and report results**

Execute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.

## Reference

For detailed guidance, examples, and constraints, see [references/322-frameworks-spring-boot-testing-integration-tests.md](references/322-frameworks-spring-boot-testing-integration-tests.md).
Pliki w paczce (2)
  • SKILL.md 4 KB
  • references/322-frameworks-spring-boot-testing-integration-tests.md 38 KB

Wersje

W bazie nie ma innych skilli o nazwie 322-frameworks-spring-boot-testing-integration-tests.

Migawka bazy z 13.11.2026 · wersja paczki 2ed2bb03cfdd (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100spring-boot-testing
    Pomaga pisać testy Spring Boot 4: jednostkowe, wycinkowe, integracyjne z Testcontainers i testy architektury ArchUnit.
  • 100323-frameworks-spring-boot-testing-acceptance-tests
    Implementuje testy akceptacyjne w Spring Boot ze scenariuszy Gherkin: klienta testowego, kontenery testowe i symulację usług zewnętrznych.
  • 100spring-boot-integration
    Prowadzi testy integracyjne Spring Boot z Testcontainers, testami slice i pełnym kontekstem: prawdziwa baza, integracja API i przepływy end-to-end.
  • 100spring-boot-testing
    Pisze testy jednostkowe, integracyjne i slice dla aplikacji Spring Boot 3.
  • 100testcontainers
    Prowadzi testy integracyjne w Javie z Testcontainers w Dockerze: kontenery baz danych i systemów komunikatów oraz @ServiceConnection w Spring Boot.
  • 100spring-testing
    Pomaga pisać, naprawiać i modernizować testy w projekcie Spring Boot 4, z Testcontainers 2.x i nowym API testowym.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.