Local Job Testing
This guide explains how to unit-test your job implementations locally. The Milvasoft.Milvaion.Sdk.Worker package lets you execute any job and inspect its result without a running RabbitMQ, Redis, or database.
Why Test Locally?
When you develop a new job in your worker, the typical deployment cycle looks like this:
Code → Build → Docker image → Deploy to Dev → Activate job → Trigger manually → Check logs
This cycle is slow and requires a live environment for every iteration. Local testing short-circuits this by running the exact same job execution path directly in a test process:
| Local Test | Live Environment | |
|---|---|---|
| RabbitMQ | Not required | Required |
| Redis | Not required | Required |
| Database | Not required | Required |
| Milvaion API | Not required | Required |
| Feedback speed | Milliseconds | Minutes |
| Debugger | Full support | Not available |
| Result inspection | Programmatic | Dashboard only |
Tip: Local tests do not replace live testing in a Dev environment. Use them to iterate on business logic fast, then validate end-to-end in Dev before promoting.