What are some best practices when writing test classes?



What are some best practices when writing test classes?..

Answer / Rajmala

Some best practices when writing test classes in Salesforce include: 1. Testing all critical and complex business logic; 2. Testing both positive and negative scenarios; 3. Covering code with at least 75% test coverage; 4. Using clear and descriptive test methods; 5. Writing test methods to be independent of each other.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What all are the components of workflow?

1 Answers  


How many records can a select query return? How many records can a sosl query return?

1 Answers  


What are encrypted fields? : salesforce objects & fields

1 Answers  


Will visualforce still supports the merge fields usage like s-control?

1 Answers  


Which interface need to implement so that you can use lightning component as quick action? : salesforce lightning component

1 Answers  


What is a custom object in Salesforce?

1 Answers  


What is tab in salesforce?

1 Answers  


What is a role and role hierarchy? : salesforce admin

1 Answers  


What is visualforce? : salesforce visualforce

1 Answers  


How you will do Mass Insert through trigger?

1 Answers   American Express,


What is mvc architecture in visualforce?

1 Answers  


How do we schedule a batch apex?

1 Answers  


Categories