Which three considerations should be made when using the runAs() - ProProfs Discuss
Topics
Products
Follow Us:

Which three considerations should be made when using the runAs() method to design apex unit tests? UC has a strict security model enforced through object, field, and row-based security mechanisms. The architect would like to ensure the security model is being thoroughly tested using apex automates tests.



A. runAS count towards total dml statements issued within the transaction
B. runAs can be used inside of the classes to validate Field level permissions
C. runAS can be used inside of test classes to validate record level security
D. runAs does not enforce user permissions or field-level permissions in test classes

This question is part of SHARING AND VISIBILITY ARCHITECT
Asked by Maxxpower, Last updated: Mar 29, 2020

+ Answer
Request
1

3 Answers

Pritam

Pritam , Sr. Salesforce Consultant, Dubai

Answered Feb 19, 2020

C. runAS can be used inside of test classes to validate record-level security.
D. runAs does not enforce user permissions or field-level permissions in test classes.

1
 

Gabriel

Gabriel

Answered Mar 02, 2020

C. runAS can be used inside of test classes to validate record-level security.
D. runAs does not enforce user permissions or field-level permissions in test classes.

 

mitesh

Mitesh

Answered Feb 09, 2020

The correct answers are as follows:

B.runAs can be used inside of the classes to validate Field level permissions.
C.runAS can be used inside of test classes to validate record level security.

1
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.