• Seek84
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I've had this discussion in the past with a few people at Salesforce.com and at the time there was no resolution to this issue.  If you're publishing a managed application that includes triggers on standard objects, how can your unit tests account for or bypass the customer's custom validation rules?

 

For example, if I have a trigger on the account object and my unit test inserts a new account to get the required test coverage, how do I allow for a customer who has a custom required field or a validation rule on a specific field that can't be known about during creation of the managed package?  Currently this would cause the unit test to fail.

 

Failed unit tests can be ignored for installation of managed packages, but they can't be ignored when a customer is deploying code from a sandbox/DE org to a production org or when migrating change sets from sandbox to production in an org with a managed package already installed that has failing unit tests. 

 

Thanks, 

  • March 03, 2010
  • Like
  • 0