Linked Questions

-5
votes
1answer
1k views

How to write Test classes to export data from the CSV file [duplicate]

I am referring the source code from the link: Unable to upload the xlsx file using Apex and Visualforce, why? . How we can write the test classes for it ? ImportDataFromCSVController public class ...
0
votes
2answers
119 views

need help writing test trigger [duplicate]

I recently wrote my very first trigger and I'm looking to deploy to production. Before deploying I need help with writing test code but I don't know what I'm doing. Basically i want to test my trigger ...
0
votes
0answers
467 views

Test Controller for Visualforce Email Template Component - How? [duplicate]

I have a controller that does simple queries of data for a visualforce email template. Not setting or computations, simple queries for list lines. How do I test this? public class ...
-1
votes
1answer
177 views

How to create test class for my apex class? [duplicate]

I'm struggling with the following problem for two days. I want to create a test class for my apex class. here is code of the apex class global class Email2Lead implements Messaging....
-1
votes
1answer
186 views

Unittest to test if a TriggerHandler calls up a class correctly [duplicate]

I need to write a testmethod that checks if the triggerHandler works fine. I have a Trigger on Users, a TriggerHandler that calls up a class and one of its methods, and a testclass. But how do I ...
-4
votes
1answer
122 views

Test Code for Apex Trigger… HELP PLEASE [duplicate]

Good morning, I have written the following APEX Trigger and it does seem to work in my Full Sandbox. My question being I am trying to learn on the fly here is can anyone help me with TestCode for it ...
0
votes
1answer
105 views

How to write test class for this trigger? [duplicate]

trigger CheckOrderAttachmentTrigger on Opportunity (before insert, before update) { try { Map<Id,Opportunity> opportunityAttachments = new Map<Id,Opportunity>( [...
-3
votes
1answer
63 views

test class for controller with many if condition [duplicate]

please provide the test class for the below custom controller. my code coverage is 58% with this test code: @isTest(seealldata=true) public with sharing class TestOpportunityController1 { static ...
0
votes
3answers
80 views

How can i write a test method for this? [duplicate]

I'm having a problem since my query get empty result and i'm not sure how to solve it, How can i write a test method for it? which objects i need to create? webService static String processReject(...
1
vote
1answer
34 views

Increase Code Coverage [duplicate]

I have a Schedulable class which is scheduled to execute every night at 12:00 AM. Here is my class: public class appdevDailySnapShot implements Schedulable{ public List<App_Dev__c> ac {set;...
0
votes
2answers
31 views

How to write a test list of the Trigger [duplicate]

I am very new at the development. I finish writing the Trigger but have no idea with the test code. I trying to write the test code but get 0% of code coverage. Here is my Trigger and test code. ...
-6
votes
1answer
35 views

How to cover code 100% [duplicate]

public class MyPositionClass { public List<Position__c> pos; public void updatePositionRecords() { pos = [select id, Name, Apex__c, Close_Date__c, Days_Open__c, ...
0
votes
0answers
19 views

Help with Test Class for trigger and apex class [duplicate]

I am new to Apex test classes and I have a trigger and class that is working for my org but I have no idea where to start to get them to have coverage. Anyone able to help me on this? public Class ...
0
votes
0answers
16 views

I need help with a test class unit [duplicate]

I have the following trigger and I would need some help in creating the test class. trigger listingLocationUpdate on pba__Listing__c (before insert, before update) { //Mantiene actualizado el ...
2
votes
1answer
3k views

Lightning Component Test Class

I am looking to deploy a Lightning component written by the amazing Jitendra Zaa. Unfortunately, there was no test class included with the component on his blog post. I have no idea where to begin in ...

15 30 50 per page