-
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 6 years, 9 months ago by
Shubham.
-
This discussion was modified 6 years, 9 months ago by
Log In to reply.
Popular Salesforce Blogs
Empowering Customer Engagement: Unleashing AI in Salesforce CRM
In today's data-driven world, the fusion of artificial intelligence (AI) with customer relationship management (CRM) is transforming the landscape of customer service, engagement, and retention.…
How Does AI In Salesforce Enable Users and Businesses to Meet Their Goals?
People who work in businesses have goals. The same goes for people who use the software. Organizations try to help their businesses meet their goals…
Calling from Salesforce: Use RingCentral
Hello Everyone, Salesforce is nowadays a huge platform for all the developers, administrators, and users as well. So in this tech world, everyone needs a…
Popular Salesforce Videos
Salesforce Careers: Drive Success Through the Lens of the Customer
Salesforce employs over half of the Technical Architects across the globe and is shaping the future! Visit careers at Salesforce to apply for the Professional…
Build a Simple Screen Flow with Salesforce Flow Builder
Did you know that you can build interactive custom components without any code? Flow Builder is a powerful tool for automation and for giving Admins…
Connecting to Salesforce in Outlook
Bring together the two platforms you use everyday: Salesforce and Microsoft Outlook. View and work with Salesforce data directly in your Outlook inbox, create Salesforce…
Popular Salesforce Infographics
Salesforce Dreamforce: A History of Innovation
Salesforce is anything but your average technology company. From its 1-1-1 philanthropic model to the scrappy startup culture, Salesforce defies traditional logic for how a…
How to Integrate Salesforce with External Systems
Salesforce Connect empowers you to associate Salesforce to external heritage frameworks like Oracle, SAP, DB2, Microsoft SharePoint continuously, without making a duplicate/copy of any single…
Sales trends and performance: ANZ versus global
Technology is pushing customer expectations to all-time highs and sales organisations into uncharted territory. Organisations worldwide are coping differently as sales trends change operations. Sales…