You need to sign in to do that
Don't have an account?
How to deprecate a global test method in a managed package
I need to upgrade an Apex Class of a managed package from API version 24 to version 38 in order to take advantage of the relatively new Work Order object. Because the Class uses an older API version, it contains a global static test method which I'm unable to remove because it's part of a managed package. I'm also not able to comment it out using @deprecate and so what can I do to get around this problem?
You can deprecate the method by using the @deprecated annotation:
@deprecated
global static void MyMethood(){
}
This will prevent new subscribers of your package from seeing that method.
Existing subscribers, however, will still be able to access the method.
Hope this will help you.
Please mark it best answer if it helps.
Regards
Error: Compile Error: Test methods must be in test classes at line 829 column 35