+ Start a Discussion
Aryan JhaAryan Jha 

Method does not exist or incorrect signature: void startTest() from the type test

public class AddPrimaryContactTest {
    static void setup() {
        List<Account> accounts = new List<Account>();
        // add 50 NY account
        for (Integer i = 0; i < 50; i++) {
        accounts.add(new Account(Name='NY'+i, billingstate='NY'));
         // add 50 CA account
        for (Integer j = 0; j < 50; j++) {
        accounts.add(new Account(Name='CA'+j, billingstate='CA'));
        insert accounts;
       static testmethod void testQueueable(){
        contact a=new contact(Lastname='mary', Firstname='rose'); 
        AddPrimaryContact updater=new AddPrimaryContact(a, 'CA');
        System.assertEquals(50, [SELECT count() FROM Contact WHERE Lastname='mary' AND Firstname='rose']) ;                      
AbhishekAbhishek (Salesforce Developers) 
There is a good chance you actually created a class somewhere called Test. Find it and delete it.

For further reference check this,


If it helps you and closes your query by marking it as solved so that it can help others in the future.