You need to sign in to do that
Don't have an account?
Jessica Miller 27
apex test class error when deploying changeset
Unfortuantely, I have an apex test class failure on a class that is from an appexchnage app that is unmanaged and so they wont be able to help. Does anyone know what this means?
System.Exception: Assertion Failed
Stack Trace: Class.test_updatecontactrolecount.testcreateopptywithconditionandrole: line 38, column 1
I went to line 38 of that class and it says: System.assert(false);
System.Exception: Assertion Failed
Stack Trace: Class.test_updatecontactrolecount.testcreateopptywithconditionandrole: line 38, column 1
I went to line 38 of that class and it says: System.assert(false);
39 //System.assert();
40 }
Make it as best answer if it helps.
Thanks!
All Answers
Comment your assertion statement if you got required coverage and try to deploy.
//System.assert();
Thanks.
Thanks for your reply. Sorry I'm not a developer so I want to make sure I know what I'm doing before I edit in sandbox. I edit the class in sandbox. Do you mean add this as a new line under line 38? Does it matter if there is a space under this new line/comment? There isn't one now. The next line right now is just }
Then I deply into production and it will replace what it's production?
Thanks
Before commentting assertion statement(line no 4). After Commenting assertion statement(line no 4).
Assertion statemens are used to cross check the results.
Here richi explained it well(Look at best answer).
https://developer.salesforce.com/forums/?id=906F00000008x42IAA
Thanks.
Thanks for your help. Unfortunately my lack of experience in apex and code makes this difficult for me to understand and how I can make it relevant to the apex class I'm looking at.
Below is what it was currently. Is your proposed fix the 2nd one?
38 System.assert(false);
39 }
38 System.assert(false);
39 //System.assert();
40 }
Thanks!
39 //System.assert();
40 }
Make it as best answer if it helps.
Thanks!
Thank you so much. That fixed it!