
unit-test-scheduled-async
Provides patterns for unit testing Spring `@Scheduled`
by giuseppe-trisciuoglioFree
Description
unit-test-scheduled-async is an agent skill from the developer-kit collection for unit testing Spring methods annotated with @Scheduled and @Async. It gives patterns for checking CompletableFuture results, using Awaitility where a test has to wait for a race condition, mocking the execution of a scheduled task, and validating error handling in async code. The aim is to test this background logic without waiting for real scheduling intervals, so a cron-based job can be checked in milliseconds. The skill also covers testing cron expression logic on its own, verifying thread pool behavior and execution counts, and testing background task logic in isolation from the rest of the application. Use it when you are writing or fixing tests for scheduled jobs and asynchronous Spring services, especially when the tests are slow or flaky because they depend on real timing. The skill is free. Its page shows about 3.9K installs and 371 GitHub stars for the repository, and its audits show Gen Agent Trust Hub, Socket and Snyk all at Pass.…
Highlights
- Tests for @Scheduled and @Async methods
- CompletableFuture result checks
- Awaitility for timing-sensitive assertions
- Cron logic tested without real waits
- Thread pool and execution count checks
Ratings & Reviews
No ratings yet
Be the first to rate unit-test-scheduled-async.
People also visit

unit-test-application-events
Provides patterns for unit testing Spring application events
unit-test-scheduled-async FAQ
What does the unit-test-scheduled-async skill do?
It guides an agent in writing JUnit 5 tests for Spring @Scheduled and @Async methods, so the background logic can be checked in isolation.
Does it test without waiting for the schedule?
Yes. The page says the tests check task logic and cron expressions without waiting for real scheduling intervals.
How do I install it?
Run: npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill unit-test-scheduled-async
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best unit-test-scheduled-async alternatives?
Popular alternatives to unit-test-scheduled-async include unit-test-caching, unit-test-application-events and unit-test-exception-handler. See all unit-test-scheduled-async alternatives










