Hi Community! Is there any established best practices for developing a library of prefect flows? One of the struggles I have is instituting standards for a CI process for a library of flows. Part of the challenge is that code for flows represents a delayed execution of tasks, so it is difficult to test flows without deploying them to a specific environment
c
Chris White
08/22/2020, 12:11 AM
Hi @Maxwell Dylla! This is something we’ve been intending to document better for a while; there are many ways of testing flows depending on your needs.
- calling the
.run()
method of a Task allows you to unittest your tasks
- you can use a TaskRunner to test your task’s trigger logic
- you can use a FlowRunner to test how states propagate through your Flow
I’m sure there are other aspects that I’m not remembering off the top of my head, but hopefully that’s provides a good starting place for you!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.