Why do we need to write test classes? How to identify if a class is a test class?



Why do we need to write test classes? How to identify if a class is a test class?..

Answer / Shahadat Hussain

Test classes are necessary in Salesforce to ensure that Apex code works as expected and does not introduce bugs or issues. Test classes help validate business logic by exercising the code with different inputs and edge cases.nTo identify if a class is a test class, look for the @isTest annotation at the start of the class declaration.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What is the use of the aura:method tag in lightning ? : salesforce lightning component

1 Answers  


What is a campaign?

1 Answers  


What are the types of portals in salesforce?

1 Answers  


Best practices of creating contact sharing rules? : salesforce admin

1 Answers  


What is the difference between Force.com and Salesforce.com?

1 Answers  


What is named credential in Salesforce?

1 Answers  


What is sharing rule?

1 Answers  


What are the different workflow actions available in salesforce? : salesforce admin

1 Answers  


Difference between dev401 and dev501?

1 Answers  


What is the difference between the normal “insert” operation and “database.insert” operation ? Which is preferred over the other and why ?

1 Answers  


What can cause data loss in salesforce?

1 Answers  


What are the different types of collections in apex? What are maps in apex? : salesforce crm

1 Answers  


Categories