+ Start a Discussion

Assert is failed in Production.


I have a problem ....


i have a test class in which the Assert is failed in Production when i deploy the code into the production...but it is correct on the Sandbox...............


please help...it's very urgent









try assertnotequals then this will pass na....this is negative testing and later u need to idetify y it is passing in SB not in Prod....check the input data by debugging..

James LoghryJames Loghry

Is your test dependent on data within the org?  If so, the data is most likely different in Sandbox then in Production.  Solution to this  is creating mock data instead of depending on existing data.