+ Start a Discussion



Best Answer chosen by Admin (Salesforce Developers) 

Basically, within the class, you want to make a test method and have it run through your various methods. You'll want to follow best practices and make sure you don't rely on data in the system and make your own within the test method, make sure you follow through both good runs and bad runs (errors), and do assert equal checks to make sure everything worked out correctly. It would appear something like this:


static testMethod void Testing(){
        Account a=new Account();


        insert a;


        TestClass tc=new TestClass();






There's obviously more to it, but that should get you on the right track