You need to sign in to do that
Don't have an account?
AyanHore
Apex test class for different profiles
Hi,
I'm currently working on an Apex test class. However, the controller I'm trying to test is divided into several sections, each meant to be for diffferent profiles.
As a result, I've to test each profile using a single runAs() method for each profile users, but those were only able to test parts of the controller and not completely.
My test class has different methods for each profiles and they cover roughly 25-30 % of the code, so it is nowhere near 75% (let alone 100%).
I've tried to club different runAs() method calls in a single test method, but I'm hitting the maximum number of SOQL limit of 100.
Right now I'm stuck with 40% code coverage of my controller. Any help/suggestion will be very welcome..!!
Thanks,
~Ayan
I'm currently working on an Apex test class. However, the controller I'm trying to test is divided into several sections, each meant to be for diffferent profiles.
As a result, I've to test each profile using a single runAs() method for each profile users, but those were only able to test parts of the controller and not completely.
My test class has different methods for each profiles and they cover roughly 25-30 % of the code, so it is nowhere near 75% (let alone 100%).
I've tried to club different runAs() method calls in a single test method, but I'm hitting the maximum number of SOQL limit of 100.
Right now I'm stuck with 40% code coverage of my controller. Any help/suggestion will be very welcome..!!
Thanks,
~Ayan
if that's right then mark this is as the best answer - cheers dan