What is system.runas () is test class?



What is system.runas () is test class?..

Answer / Ram Singh

In a test method, System.RunAs() allows you to run code as another user. This is useful for testing scenarios where you need to simulate the behavior of different users in your org.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

Name the types of relationship in salesforce

1 Answers  


Is salesforce.com is a public cloud or private cloud?

1 Answers  


How many ways call controller from visualforce page ?

1 Answers  


Will data be lost in a custom field if data type is changed to number from any other data type?

1 Answers  


Why Governor Limits are introduced in Salesforce.com?

1 Answers   Deloitte,


What are the different types of states in salesforce?

1 Answers  


What are setup and non-setup objects in salesforce?

1 Answers  


How you will do Mass Insert through trigger?

1 Answers   American Express,


What are sharing rules? Name what are the types of sharing rules?

1 Answers  


What is the difference between a standard controller and a custom controller?

1 Answers  


what are future methods and where are they used ?

1 Answers  


How can we implement pagination in Visualforce?

1 Answers   Cognizant,


Categories