function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
salesforce sfdxsalesforce sfdx 

Hi Team, Is TestClass is Mandatory for flows

Hi Team, 
We had created a few flows in Sandbox and need to deploy them in production after the sprint, Is Test classes mandatory for the flows we created?

Thanks
Prathusha Reddy
SubratSubrat (Salesforce Developers) 
Hello ,

The Answer for your question is , that it is not mandatory to create a test class for deploying a flow .

However it is a best practise to do so .

We also have an idea which is going on to mandate the test classes , but it is still not in action .

Requesting you to go through the below link too ->
https://ideas.salesforce.com/s/idea/a0B8W00000GdgndUAB/flow-and-process-builder-should-require-apex-tests-to-activate

If it helps please mark this as best answer !
Thank you .