Trigger Failing to deploy Gearset deployment

Scenario

We are trying to deploy a new fresh Apex Trigger to production and deployment is getting failed. Trigger handler test class has 90% code coverage on DEV and UAT environments.

Possible Solutions

  • Missing .xml file
  • Make sure your Gearset pull request contains all required files example: Apex class with .xml file.
  • Do not use hard-coded id’s in test class.
  • Your Test Class must have at least 75% of code coverage.
  • Required components are present in production: before deploying trigger make sure all required components like Objects, Metadata’s, Fields which are referenced in Test Class or Handler are available in production.

Leave a Reply