Tips and Tricks : Test class for Invocable method
I got 100% coverage in my sandbox but when run validation for deployment it returns 0% coverage
It turn out that in my sandbox, I am depending on Process Builder to Invocable Apex class, as long I manipulate test data that fire Process Builder it will call Invocable class. This is not useful when deploying it to Production although it gets deployed together with Process Builder.
The correct way is to direct call Invocable method inside test class itself.
Example of class :
Example of test class :