-
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 ago by
Shubham.
-
This discussion was modified 6 years ago by
Log In to reply.
Popular Salesforce Blogs
What are Flows In Salesforce in 2023?
A flow is a Salesforce application that collects data and performs actions in your Salesforce org or an external system. To automate a business process…
Searching Account Name Via Search Key Through Salesforce Visualforce Page
Introduction Visualforce is a web development framework that enables developers to build sophisticated, custom user interfaces for mobile and desktop apps that can be hosted…
Salesforce Admin Tips For A User-Friendly Org
When we talk about the term user-friendly, what comes to your mind? Obviously, something that is not difficult for the user to use? Now when…
Popular Salesforce Videos
Salesforce Trailhead Bootcamp - Fast Track your Salesforce Certification - $700 OFF LIMITED TIME
If want to fast track the path to your Salesforce Administrator Certification then this video is for you! This offer includes your $200 Certification Voucher…
Email to Case Advance | Converting Cases from Emails Effectively | Salesforce Tutorial
Email-to-Case Advance is an enhanced version of the Salesforce Email-to-Case functionality that converts customer email to cases. It works for Salesforce Service Cloud and provides…
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
How IT Leaders Can Build Employee Advocacy | Salesforce Infographic
We created the APAC Employee Engagement report based on this research, to provide key insights that are critical to IT and people leaders now and…
The Basics of Lead Nurturing [INFOGRAPHIC]
Qualifying leads no longer has to be a tedious task for your team. Lead nurturing campaigns automate the entire process for you. This means your…
Salesforce CRM Integration With External Systems
Salesforce integration is one of the most important aspects of Salesforce services. It allows businesses to keep their Salesforce environment up and running. Integration Features…