-
what is the solution for this error(Method does not exist or incorrect signature: void StartTest() from the type test) in Salesforce?
i am experiencing this error (Method does not exist or incorrect signature: void StartTest() from the type test) in the asynchronous trail's future method unit..
here's my code
@isTest
public class AccountProcessorTest {
public static testmethod void AccountProcessorTest1(){
Account testaccount = new Account();
testaccount.name = 'Test Account';
insert testaccount;Contact testcontact = new Contact();
testcontact.FirstName = 'Chief';
testcontact.LastName = 'Hopper';
testcontact.AccountId = testaccount.Id;
insert testcontact;set<Id> AccId = new set<Id>();
AccId.add(testaccount.Id);Test.StartTest();
AccountProcessor.countContacts(AccId);
Test.StopTest();
Account ACC = [select Number_of_Contacts__c from Account where id = :testaccount.Id LIMIT 1];
System.assertEquals ( Integer.valueOf(ACC.Number_of_Contacts__c) ,1);
}}
Can anyone help me on how to tackle this error
- This discussion was modified 4 years, 3 months ago by Shubham.
Log In to reply.
Popular Salesforce Blogs
Why Hire Third-party Consultants for Salesforce Managed Services?
Salesforce is a fairly vast platform to understand and implement thoroughly. While its functionality is simple and automated, its development and implementation might turn out…
What's the Cost of Salesforce CRM Consulting in India?
Salesforce is one of the most widely used CRM platforms in the world. Small and large businesses use it as it offers various modules, including…
How To Become A Salesforce Developer: 5 Best Educational Tips
Introduction The number of professionals engaged in the computer science and engineering field is growing steadily. Today many people are willing to learn to program,…
Popular Salesforce Videos
Before Delete Trigger in Salesforce Flows - Winter '21 update
In this video, I'm talking about one of the new features of the Salesforce Winter '21 flow builder i.e is before delete trigger. Watch and…
Salesforce Professional Services Helps Customers Get Value From Salesforce, Faster
Our experts have helped thousands of customers transform their businesses, operating models, and cultures, all backed by the full power of Salesforce. Watch this video…
Salesforce Marketing Cloud Automation Studio
Automation Studio is a Marketing Cloud application used to execute multi-step marketing and data management activities on an immediate, triggered, or scheduled basis. Use Automation…
Popular Salesforce Infographics
The Salesforce Lightning Platform for Employee Engagement: Key Findings
Salesforce provides a system of engagement across the entire employee lifecycle that enables organizations to connect multiple back-end systems of record with one system of…
6 Tips to Evaluate the Right Salesforce QA Vendor
Salesforce is the ultimate customer success platform, which makes it important to choose the right partner for your Salesforce project especially because it governs your…
Customer Service: The Forgotten Marketing Channel
The key to good customer service is building good relationships with your customers. Thanking the customer and promoting a positive, helpful and friendly environment will…