You need to sign in to do that
Don't have an account?
sandeepathadu
how to cover the else condition in test class
plz help me how to cover the else condition in salesforce
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
plz help me how to cover the else condition in salesforce
Hello friend,
In first testmethod if yout "IF" condition matches criteria then it would be execute. For covering "else" condition you should write another testmethod in which the situtation should not satisfy "if" criteria hence automatically "Else" part would be executed.
Thank You
Hope this Helps
Raumil Setalwad
if i have 3 to 4 times of else conditions for one if then what i should do
Yes if there is "else if" ladder then for each "else if" condition you hould specify different test class else your code will not be covered hundred percent.
Thank You
Raumil Setalwad
If you can share your class and testClass , it will be helpful to suggest you test case.
my class
this is my class