You need to sign in to do that
Don't have an account?
Ricardo Aguilar 4
Unable to deploy apex class in production (Assertion Failed)
Hello,
I am trying to deploy an Apex Class in Production, but I haven't been able to succeed. The apex class runs properly in sandbox but when I deploy the code in production, I received the following error message:
System.AssertException: Assertion Failed: Expected: 2, Actual: 0
Stack Trace: Class.CloneListTest.testCloneListControllerFive: line 159, column 1
This error message belong to a Class Name "CloneListTest" which is different from the one I'm trying to deploy.
Any help is appreciated! Regards.
I am trying to deploy an Apex Class in Production, but I haven't been able to succeed. The apex class runs properly in sandbox but when I deploy the code in production, I received the following error message:
System.AssertException: Assertion Failed: Expected: 2, Actual: 0
Stack Trace: Class.CloneListTest.testCloneListControllerFive: line 159, column 1
This error message belong to a Class Name "CloneListTest" which is different from the one I'm trying to deploy.
Any help is appreciated! Regards.
Option 1 :- You can comment the Assertion and deploy
Option 2: fix the asseting expected value and deploye
Option 3 : If the Assertion is failing due to data issue fix the data and deploy