function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sparktestsparktest 

failed test - successful in dev deployment, but deployment into prod failing

 
I am having a heck of a time trying to figure this one out.  I am deploying a field update (before insert, before update) from eclipse/apex.  It does some basic calcs to get a total dollar value, assigns that value to the field.....and that's pretty much it.
 
It tests and deploys and works in the dev environment just fine.  I cannot deploy it to production however.  I get a total 0% tested lines failure on the class, while it is 94% in the test system. 
 
Also, the assertion fails in the test method.  I set the field to have a default value in the UI (both dev and prod) and again, while the test and dev system work fine, but the prod environment causes the assertion to fail, returning only the default amount instead of the udpated amount that it should be......
 
I have written another very similar class to update a date field based on the same type of trigger, and that one works fine everywhere.....so I am befuddled as to why this one is choking.
 
Anyone else hear of anything like this?
JonPJonP
First, are you using the Deploy to Server wizard in the Force.com IDE to do your deployment?  Or are you deploying in some other way?

Please post the bodies of the Apex classes and triggers you are deploying, including your test methods.

Thanks,
Jon
salesforce.com Product Manager
sparktestsparktest
 
Major "DOH!"
 
I was not deploying both the class and trigger at the same time.  For some reason I got away with it on my first couple deployments, but this one did not like it. 
 
Sorry for the bother........
 
Thanks,