You need to sign in to do that
Don't have an account?
Pallavi singh
How to include the error info in the test class?
Hi
i want to include this error info into my test class now my test class is covring 91% but i need 100% coverage.
for(Database.Error error : errors) {
errorStrings = errorStrings + ' ' + error.getMessage();
}
}
return errorStrings;
}
i want to include this error info into my test class now my test class is covring 91% but i need 100% coverage.
for(Database.Error error : errors) {
errorStrings = errorStrings + ' ' + error.getMessage();
}
}
return errorStrings;
}
Hey Shruthi,
In the test class, You have to create a condition that causes the error, such as leaving a required field (name, for example) blank.
Kindly mark it as the best asnwer if it works for you.
Also refer this where similar discussion has done :-
https://developer.salesforce.com/forums/?id=906F0000000kEbrIAE
Thanks & Regards,
Priya Ranjan