You need to sign in to do that
Don't have an account?
can we write multiple test classes to cover a single class
Hi,
actually i have a Apex controller which is huge and which has many scenarios with more SOQL queries. when i write test cases in a single test class to test all the scenarios i am getting "Too Many SOQL quiries limit exception". i dont know why salesforce treats all test methods in a single class as a single transaction.
so to compensate this i am thinking of writing another test class to test some scenarios. will this work correctly. is this approach a good practice?
please let me know if anyone faced same problem in test classes. help me to solve the problem.
Regards,
Rakesh
Hi Rakesh,
In a single test class you can create multiple test methods on the basis of different scenarios.
Thanks,
Varun