spring-webflux-testing
WebFlux testing requires StepVerifier for reactive streams — standard assertions silently pass on empty Flux. WebTestClient API differs from MockMvc. Read before testing reactive endpoints. Triggers: @WebFluxTest, WebTestClient, StepVerifier, Mono, Flux, mockUser(), mockJwt(), mutateWith, verifyComplete, expectBody, expectStatus, @AutoConfigureWebTestClient.
Works with
--- name: spring-webflux-testing description: WebFlux testing requires StepVerifier for reactive streams — standard assertions silently pass on empty Flux. WebTestClient API differs from MockMvc. Read before testing reactive endpoints. Triggers: @WebFluxTest, WebTestClient, StepVerifier, Mono, Flux, mockUser(), mockJwt(), mutateWith, verifyComplete, expectBody, expectStatus, @AutoConfigureWebTestClient. license: Apache-2.0 --- # Spring WebFlux Testing **Signals**: `@WebFluxTest`, `WebTestClient`, `StepVerifier`, `Mono`, `Flux`, `mutateWith`, `mockUser()`, `mockJwt()`, `thenCancel`, `verifyComplete`, `withVirtualTime` ## Tested With - Spring Boot 3.2+ / Spring Boot 4.x - Spring Framework 6.x / Spring Framework 7.x - Reactor Core 3.5+ / 3.7+ - Spring Security 6.x / 7.x (auto-configured in `@WebFluxTest`) - JUnit 5 ## Do NOT Use This Skill When - Testing Spring MVC (servlet-based) controllers → use `spring-mvc-testing` - Testing Spring Security rules in a servlet-based application → use `spring-security-testing` - Testing JPA repositories → use `spring-jpa-testing` - Testing WebSocket or STOMP messaging → use `spring-websocket-testing` - Writing pure unit tests for reactive service logic → use `spring-testing-fundamentals` for AssertJ/Mockito patterns, combine with StepVerifier for reactive ## When to Read References | Situation | Read | |-----------|------| | Setting up `@WebFluxTest`, `WebTestClient` configuration | `references/webflux-testing-patterns.md` | | GET, POST, PUT, DELETE with `WebTestClient` | `references/webflux-testing-patterns.md` | | `expectBody`, `expectBodyList`, `jsonPath` assertions | `references/webflux-testing-patterns.md` | | `StepVerifier` for Flux, Mono, error signals | `references/webflux-testing-patterns.md` | | `StepVerifier.withVirtualTime` for time-based operators | `references/webflux-testing-patterns.md` | | Testing reactive security with `mutateWith(mockUser())`, `mockJwt()` | `references/webflux-testing-patterns.md` | | Testing SSE streams | `references/webflux-testing-patterns.md` | | Boot 3.x → 4.x WebFlux testing changes | `references/webflux-testing-patterns.md` |
More Testing skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
setup-pre-commit
mattpocock/skills
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

