function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vinayakamurthyvinayakamurthy 

regarding test class

Hi i want to know about testclass can some one help me in knowing it.i am new to test class.

souvik9086souvik9086

Testing is an important part of the development process. Before you can deploy Apex or package it for the Force.com AppExchange, the following must be true.

 

At least 75% of your Apex code must be covered by unit tests, and all of those tests must complete successfully.

 

You have to cover in your apex class and trigger all the code to cover. You have to cover the conditions(if/else) by adding the value to your objects accordingly. See the below testing Best practices and testing examples.

 

Best Practicehttp://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_best_practices.htm

Examples 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_qs_test.htm

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_example.htm

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks