You need to sign in to do that
Don't have an account?
krishna.nani
how to test a simple programme
Hi,
I am new to salesforce, can any body help me out,this is the sample program,please help me out how to
execute below programme.
public class newaccount
{
Integer num=10;
public void testmethod testcontroller()
{
NewAccount_c[] accs;
accs = [SELECT Id FROM NewAccount__c WHERE name LIKE 'v%'];
Delete accs;
}
}
private class testclass
{
newaccount accs= new newaccount();
accs.testcontroller();
}
If you just want to run this class you can click on yourname on top right corner and choose Developer Console and run it there.
Copy these two lines from your private test class:
newaccount accs= new newaccount();
accs.testcontroller();
Click Debug tab -> Open Execute Anomynous window and paste your code there. Then click Execute button.
Hope this answer your question.
Ricky