You need to sign in to do that
Don't have an account?

Help - Testing of Apex Class
Hi
I've been able to tweek some code from a blog so that I have a fully functioning visualforce page search function in my sandbox. I now want to deploy to the production environment, but it will not allow it as 'Average test coverage across all Apex Classes and Triggers is 70%, at least 75% test coverage is required.'
Not being a programmer (ie I can tweek but don't have a 'write it from scratch' background) this is now frustrating as the apex code and page work so nicely and will solve a major gripe in my organisation.
Is anyone able to help? I have pasted the code below for ease. I am willing to learn, but recognise that there is a lot ot learn.
Justyn
You have no test code, so your coverage is 0%, which when you attempt to deploy, brings your org's overall coverage below the minimum 75% level.
See Testing Apex
Hi
Thanks for the feedback. I thought that might be the case. Am going to have to get a lot of coffee and read the apex test info big time. One quick question is if the testing code goes into my existing apex class or as a separate class?
Justyn
I generally put test code in a separate class. If you mark the test class with the @isTest annotation, it doesn't count against code size limits.