In this guide, we'll show you how to use the Dagster UI and Python to test your schedules. For more information about testing in Dagster, refer to the Testing documentation.
Click the Test Schedule button, located near the top right corner of the page.
You'll be prompted to select a mock schedule evaluation time. As schedules are defined on a cadence, the evaluation times in the dropdown are past and future times along that cadence.
For example, let's say you're testing a schedule with a cadence of "Every day at X time". In the dropdown, you'd see past and future evaluation times along that cadence:
After selecting an evaluation time, click the Evaluate button.
A window containing the evaluation result will display after the test completes. If the evaluation was successful, click Open in Launchpad to launch a run with the same config as the test evaluation.
To test a function decorated by the @schedule decorator, you can invoke the schedule definition like it's a regular Python function. The invocation will return run config, which can then be validated using the validate_run_config function.
Let's say we want to test the configurable_job_schedule in this example: