+ Start a Discussion

Tescase Error Coverage

trigger.new[0].addError('Please select Region');



How to cover adderror line in test, Its inside IF() Condition, Able to cover if() statement. But not adderror statement!!

Rahul SharmaRahul Sharma
Write the piece of code in try catch block(In test class) from where this trigger is been called.
Due to the error generated in test class, Further lines would not get cover.