You need to sign in to do that
Don't have an account?
Alx Mr
How to deploy Test Class itself
I have a new test class that covers the apex controller code, all in sandboxe. I have old test class and old apex controllers. when i deploy new test class i get an error: method doesn't exist in the controller (of course it doesn't because it is an old controller. When i deploy apex controller the test coverage does not pass.
Question how to deploy/update the test class in production?
Thank you.
Question how to deploy/update the test class in production?
Thank you.
You need to deploy both the test class and the apex controller class. In your case, you can't just deploy the test class. Salesforce will run test locally (i.e. in your current org/package).
Create a package with both files and try to deploy.
All Answers
I'm not sure what the actual error is, and I'm not sure why the new test class is not updated to reflect the new apex controller.
In any case, if you have Eclipse IDE:
1. Download Production instance to Eclipse
2. Select the test class you want to modify
3. Save the class. This will save it locally as you can't modify code in Production.
4. Right click on the class and select Deploy to Server
5. Follow the instructions and you should be good to go (as long as you don't have any more issues with your org).
Thanks
Temo
I want to deploy new apex class. For this i need my class to pass the code coverage test during deployment.
old production test class doesn't cover the controller class. for this i wrote new testclass. The new test class cannot be deployed as it tests methods that doesn't exist in old controller class. So the fail happens as the method referenced/tested in test class doesn't exist in old controller class.
I need to import/deploy it somehow into production as i cannot modify the old test class which is in active org.
Please help me :)
You need to deploy both the test class and the apex controller class. In your case, you can't just deploy the test class. Salesforce will run test locally (i.e. in your current org/package).
Create a package with both files and try to deploy.