Skip to main content

New answers tagged

0 votes

apex test class for remote action callable

Couple of observations seeAllData=true (not a best practice), recommended is false use testSetup to create test data, use these test record id's to pass as params, hardcoding id's is a bad practice ...
Edwin Raymond's user avatar
1 vote

Financial Services Cloud: Manual rollup of AUM fails in test class, FinServ__Household__c is null

Derek F. led me down the path to figuring out what was wrong. In the test class, I needed to explicitly create the AccountContactRelation between the Household account and the Person Account, and then ...
tonydigi1's user avatar
0 votes

Help with Test Class - I Really Don't Know What To Do

In the initial example, the instantiation of inner classes was incorrect. Inner classes in Java (and similarly in Apex) should be instantiated using an instance of the outer class. In my revised ...
Jacob Crandall's user avatar
0 votes

Package Upload Error Due to Low Test Coverage Despite High Org Code Coverage

I resolved my package upload issue, I missed to add some of test classes to package, so that it throws low coverage . I added all of my test classes to the package and uploaded successfully.
Pavan's user avatar
  • 3
2 votes

Test Class for the Apex Class? In above I am calculating time spent by record in each stage? I tried writing test class but unable do test coverage?

The golden rule of unit testing is: you only gain coverage for code that is executed as part of running the test method(s) Since you currently only have a single test method, and are only working with ...
Derek F's user avatar
  • 62.7k
0 votes

Code coverage for catch block

When code is impossible to cover, it indicates one of two conditions. The first condition is that the code is unreachable. In other words, there's no logical way to reach that line of code. The other ...
sfdcfox's user avatar
  • 497k
-1 votes

I have written a apex trigger on task and want a test class code

You may use this sample code to cover your apex trigger code.
george thomas's user avatar

Top 50 recent answers are included