Qus:    What is the purpose@TestVisible?
Oct 23, 2021 04:54 1 Answers Views: 17 LALITH
Prev Next
Answers (1)
RAMU Nov 03, 2021 04:45
Answer:   Sometimes in test classes we need to access a variable from Apex Class, if it is private we cannot access for that we will replace private with public.
For this reason we are compromising the security. To avoid this before the private variables in apex class we can include @TestVisible so that even though variable is private we can access from the test class.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect