How will Groove impact my Apex unit tests?

After you have installed Groove in your Salesforce org, you will find new apex test classes that are part of this managed package. If you Run All Tests in your Salesforce org or deploy your own code you will observe test failures of Groove test classes. This is normal and expected with any managed package and can be safely ignored. This has been confirmed by Salesforce's developer support team.

Will Groove's Test Classes Affect my Org's Test Coverage Level?

Because managed package test failures can't always be prevented, Salesforce does not consider coverage levels or failures from managed packages when deploying your own code. In other words, test failures and coverage in a managed package will not impact the deployment of other code or apps unless you explicitly choose to execute all test classes in your org.

Why are the Groove Unit Tests Failing?

It is not possible to write unit tests that pass in all Salesforce organizations because such organizations can be have different types of configurations. Examples are:

  • is multi currency enabled?
  • are shared activities enabled?
  • is Chatter enabled?

Groove includes test code for all types of configurations but your org will only apply to one type of test coverage. Thus, a number of test classes will fail. Furthermore Groove's test classes cannot fulfill constraints that are very custom to your org. Examples are workflow rules enforcing specific fields to be populated. This is another reason why some test classes will fail.

Will these Test Failures Prevent Me from Deploying Code?

No, when deploying change sets in production, managed package tests will not run by default and, therefore, will not prevent code from deploying. 

See also: Salesforce Knowledge Article Number 000003620

Did this answer your question?