Test Runner
Building automated rules is powerful, but testing them on a live subreddit can be dangerous. Modegator includes a built-in Test Runner in the dashboard to safely validate your rules without affecting live users or content.
Simulating Webhooks
The Test Runner allows you to simulate incoming Reddit webhooks exactly as the Devvit backend would receive them.
- Navigate to the Test Runner tab in the Modegator Dashboard.
- Select the Event Type you want to simulate (e.g.,
PostSubmit). - Provide the mock payload. Modegator provides sensible defaults for dummy data (like Title, Body, and Author), but you can edit these fields to match the specific edge cases your rules check for.
- Click Run Test.
Dry Run Execution
When you click Run Test, Modegator takes your simulated payload and passes it through your currently saved YAML configuration.
However, it intercepts the final action execution. Instead of actually removing a post or banning a user, the Test Runner generates an execution report detailing exactly what would have happened.
Reading the Test Report
The report provides a step-by-step breakdown:
- Which rules were evaluated.
- Which conditions matched (or failed to match).
- Which actions were ultimately triggered based on the simulated payload.
This allows you to confidently tweak regular expressions, fix logic errors in your conditions, and ensure the right macros are executed before deploying the configuration to production.
)
