Hi Prefect,
Is there some guidance on how to mock flows runs for testing?
More specifically, I want to write a test to test my flows end-to-end, however my flow contains subflows started via
StartFlowRun
. This would require having access to a Prefect server when running my tests. I want to avoid running a Prefect Server since this will tremendously slow down and complicate my unit tests.
So I was wondering if there are ways to easily mock flow runs without needing access to a Prefect server?
k
Kevin Kho
06/09/2021, 2:54 PM
Hey @Peter Roelants, do you have a test and you just want to return something in place of
StartFlowRun.run()
? or is it that you want to test the code inside those subflows?
p
Peter Roelants
06/09/2021, 2:55 PM
I would like to test the code inside those subflows, and any results they might produce.
task in a parent flow. So if I want to test the full integration of parent flow and child flow, together with any results from the child flow that the parent flow might use, I currently need a server to run.
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.