+ Start a Discussion

Question on Apex test class and methods - new starter


We are gonna to move set of developments to production org but now have a question with regards to deployment. I read in one of the doc that we cant deploy the code in prod org if the code test coverage is atleast 75%. I must say that i have not written test coverage code...so the question is :
1. how to do the test coverage code?
2. For instance i have a class called myClass and should I create a new class called myclasstest for test coverage? if yes how would the new class would know that the test case is for the intended class ?
Abu HashimAbu Hashim

Yes we need to write a test class that should compile all your written classes in ORG. If you are a starter, please go through the below link.

Thank for your thoughts...But how does the system recogonise the test class thatis created is for a particualr class?
Abu HashimAbu Hashim
While writing your test class, you need to refer/call the flow (calling those methods of the main class) with dummy test data.