Linked Questions

0
votes
0answers
32 views

Test Class for Dynamic SOQL [duplicate]

Pretty new with salesforce dev. So forgive me. I am doing a SOQL query and then updating records. The trick here is . I am grabbing my query from two custom fields which are in the Custom Settings . ...
0
votes
0answers
30 views

Test class for RequestData class [duplicate]

@HttpPost global static List<HHSurvey> getHHSurveyList() { RestRequest req = RestContext.request; RequestData mRequestData = (RequestData)JSON.deserialize(req.requestBody.toString()...
0
votes
0answers
28 views

Testing In Salesforce [duplicate]

Please Let me know.How to write TEST class for the following code? trigger TriggerForACC on Account (before insert) { List<Contact> conUpdatedList=new List<Contact>(); List<...
-3
votes
0answers
27 views

how to write the test class for this part of code [duplicate]

@RestResource(urlMapping='/orderCreation/*') global class WebShopOrderCreation { @HttpPost global static void PostData(){ RestRequest req = RestContext.request; RestResponse res = ...
0
votes
0answers
19 views

TestClass for @HttpGet to find locations based on geocodes [duplicate]

I am new to Apex coding and with lot of struggle I wrote the below apex class to find locations based on a Geocode custom object records. Now, I am having difficulties to write a testclass for the ...
-1
votes
0answers
16 views

I want to create a test class using this code,.Anyone help me in this one?Thanks [duplicate]

public class AccountSearchController1 { //main class //results variables public Boolean hasResults{get; set;} public List<accountSet> resultSet {get;set;} public List<...
7
votes
1answer
157 views

How do I increase my code coverage, or why can't I cover these lines?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through ...
5
votes
1answer
60 views

When should I use SeeAllData=true in my test methods?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through ...
0
votes
2answers
68 views

getting error method not found in test class to check duplicate Number

public static Boolean LeadDuplicateCheck(String contactInfo){ String searchQuery= 'FIND \'' + contactInfo.trim() + '*\' IN ALL FIELDS RETURNING Lead(Id,MobilePhone,Mobile_2__c,Whats_App_Number__c,...
0
votes
2answers
57 views

getting error while running a test class,error,Insert failed. REQUIRED_FIELD_MISSING

My controller class is public class Iapc { public boolean detailpage{set;get;} public boolean show{set;get;} public boolean hide{set;get;} public boolean editpage{set;get;} ...
-2
votes
1answer
41 views

Test Class approach Help on Custom Object (Query and Update)

I have an Apex class on Custom Object Called QueueDistroHelper__c What I am basically doing is getting the Queue Id from a custom field(Related_Queue_Id__c) on the Custom object Querying all the ...
1
vote
1answer
20 views

Tests passing with zero code coverage [duplicate]

It seems like literally every test I write is passing with zero code coverage org wide. I've spent the past 2 days on and off reading forums, doing trails and debugging. Below is an example of one of ...
0
votes
1answer
28 views

Custom Controller Test Coverage

Having a bit of difficulty getting any code coverage for my custom controller. The goal of the controller is to display a list of opportunities in a list where the division of the user is the same as ...
0
votes
1answer
48 views

testclass for triggerhandler [closed]

I am new in the apex and I don't know how to started to create a test class for apex trigger handler. So those anyone here how to create a sample test class of my apex trigger handler small idea may ...
0
votes
0answers
16 views

How to call 'saveFile' method from an apex test class as it is non static.Please find the below code

public class ESMX_uploadDoc_Controller { public String sobjIds{get;set;} public List<id> ipidList {get;set;} //initialize the controller and picking up the ids public ...