-
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 5 years, 10 months ago by
Shubham.
-
This discussion was modified 5 years, 10 months ago by
Log In to reply.
Popular Salesforce Blogs
Salesforce: How AI, CRM, and Einstein 1 Are Transforming Businesses in the USA
Businesses are rushing to improve their customer interactions, optimise processes, and achieve growth in today's fast-paced digital environment. Salesforce, the world's Top AI-powered CRM platform…
QRCode with LWC in Salesforce
Hello Geeks, I was working on the generation of QRCode in LWC which is the new feature of Salesforce from the Spring '19 release. We…
Introduction to Salesforce Flows | The Developer Guide
Overview To eliminate tedious tasks like data input and complex business processes, you can use Lightning flows (or just flows). The utilization of flows allows…
Popular Salesforce Videos
What is Salesforce Commerce Cloud? | Salesforce Video Tutorial
Do you know what is Salesforce Commerce Cloud? Formerly called Demandware, it is a cloud-based service for unifying the way businesses engage with customers over…
Salesforce CPQ Subscription Pricing
Configure Price Quote (CPQ) is a powerful sales tool that enables companies to produce accurate and highly configured sales quotes for customers — especially in…
Practice Test and Questions for Salesforce Platform App Builder Certification Exam
In this video, Shrey provides a practice test for the candidates who are preparing for the Salesforce Platform App Builder Exam. This test boosts your…
Popular Salesforce Infographics
Salesforce Buy Vs Salesforce Build - An Infographic
Uncover the Process that every business should understand at the time of Salesforce implementation and integration. Salesforce Solution Buying Process Search for Required Solution on…
Best Ways to Bring Customers and Companies Closer With Salesforce
Salesforce is World’s #1 CRM It works as a single source of truth It delivers fast time to value It is a scalable & flexible…
Salesforce Almanac
Salesforce is the number one CRM of the world and it has attained great popularity over the years. Its journey is worth seeing so here…