Qus:    Is it possible to write test code inside of an apex class or apex trigger?
May 29, 2021 12:22 1 Answers Views: 20 RAMU
Prev Next
Answers (1)
LALITH May 30, 2021 13:53
Answer:   We cannot write test code (test methods) inside of the apex trigger. From API Version 28.0, we cannot write the test methods inside of an apex class which is not decorated with @isTest.We can write test methods only in a class which is decorated with @isTest.

Note: We have a governor limit for the overall Apex Code size of the organization which is of 3 MB. If we decorate a class with @isTest annotation Apex Code Size governor limit will be bypassed.

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