Local Testing Setup
Use pre-defined test events inrequests/events
and the playground script at playground/workflow_playground.py
to execute workflows directly.
Running a Test
To test your workflow locally, use the following simple pattern:event_key
parameter corresponds to a JSON file name in the requests/events
directory. For example, event_key="product"
loads requests/events/product.json
.
Benefits of Local Testing
Immediate Feedback
You see results instantly without waiting for async processing or checking databases.Easy Debugging
Add breakpoints and step through your workflow logic in your IDE.No Dependencies
You can test without running Docker containers, Celery workers, or databases.Rapid Iteration
Modify and test workflow logic quickly without restarting services.Creating Custom Test Events
To add your own test events:1
Create JSON file
Add a new JSON file to
requests/events/
with your test data2
Match schema
Ensure the JSON structure matches your event schema exactly
3
Reference by name
Use the filename (without .json) as the
event_key
in EventFactory