-
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
Salesforce Development Trends to Watch in 2024
Being an exciting CRM platform, Salesforce has been an integral part of the business world. The suite of Salesforce applications is beginning to find widespread…
How to Override Standard Buttons With Lightning Component?
A Lightning component is required to implement lightning:actionOverride interface to be used to override a standard action on an object. You can override the View,…
Algoworks Becomes Salesforce Silver Consulting Partner
For more than a decade, Algoworks has been providing outstanding services around Salesforce consultation, customization, development, and integration by bringing right skills and expertise around…
Popular Salesforce Videos
Login Flow In Salesforce
You can use a login flow to customize the login experience and integrate business processes with Salesforce authentication. Common use cases include collecting and updating…
Validation Rules in Salesforce | Video Tutorial Guide
In this video, Srinu Namani briefs about Validation Rules in Salesforce. Validation rules are an important part of keeping your data clean and organized, and…
Salesforce Health Cloud
Salesforce Health Cloud is a health IT CRM system that incorporates doctor-patient relationship and record management services. Through Private Communities, patients can view care plans,…
Popular Salesforce Infographics
Salesforce Field Service: Power Up Your Field Operations
Salesforce Field Service, commonly known as Field Service Lightning (FSL), is the extension of Service Cloud that provides a unified view of workforce management. In…
How To Crack Salesforce Admin Exams with Ease?
The demand for Salesforce Admin professionals is increasing day by day. industries are constantly looking for certified Salesforce Admins. Clearing Salesforce Admin Certification Exams is…
The 6 Greatest Benefits of CRM Platforms | Salesforce CRM
A CRM platform helps companies target different audiences, set scores and alerts based on an individual lead or customer’s activity, proactively work with contacts and…