Test Classes fail with error Dependent class is invalid and needs recompilation
|Knowledge Article Number||000229072|
|Description||During a deployment test classes might fail with error : Dependent class is invalid and needs recompilation
Classes and triggers are marked as valid as long as dependent metadata has not changed since the class was last compiled. If any changes are made to object names or fields that are used in the class, including superficial changes such as edits to an object or field description, or if changes are made to a class that calls this class, the isValid flag is set to false.
This information is available in " Defining Apex Classes" : https://help.salesforce.com/HTViewHelpDoc?id=code_define_package.htm
Please be aware that all classes and triggers are marked as invalid when a managed package is upgraded in the Org.
|Resolution||This errors means that the classes and triggers need to be compiled in your Org.
1. To compile Classes go to: Setup>> Develop >> Apex Classes
Click "Compile all classes" Link
2. To compile Triggers go to: Setup>> Develop >> Apex Triggers
Click "Compile all triggers" Link
If the "Compile all triggers" is not available in your Org. please log a ticket with Developer Support requesting to enable "Compile all triggers" in you Org.