3

I have FinancialForce installed in my SF instance, I want to deploy 3 new components from my sandbox environment 100% covered, but always I'm receiving the same deployment error related to Financial-force Triggers.

enter image description here

Is there any possible way to deploy my code or to cover those components?

1
  • Can you try with seeAllData= True in your test classes?
    – javanoob
    Aug 31, 2015 at 23:51

1 Answer 1

2

https://help.salesforce.com/apex/HTViewSolution?id=000044631&language=en_US

When you run all test classes from UI then it will run the manage package code tests and that contributes to code coverage. From IDE/ANT(METADATA API), you don't see this behavior, it only runs the test classes in your org namespace

Duplicate question:

How to handle installed Managed Packages failing tests?

From ca_peterson:

Managed package tests are only run in the following scenarios:

  • On package upload (only applicable to the package author)
  • If explicitly selected to run (changing the namespace on the run dialog for Setup > Develop > Apex Test Execution, dev console, specific API calls to run them, like setting runTests in the metadata API deploy call).
  • [On metadata API deployments that have the runAllTests flag set to true][1] (see the runAllTests description).

There have been situations in the past where managed tests run outside of these and all were deemed bugs and fixed. They do not ever run on change set deployments, although if there are managed triggers on objects your tests invoke those managed triggers will be run.

1
  • Thanks for the answer, I modified my build.xml file adding the runAllTest=true and also I added testLevel="RunSpecifiedTests" in my sd:deploy tag specifying the classes that will run the test. I could deploy my classes and Trigger.
    – Edgar
    Sep 1, 2015 at 1:14

Not the answer you're looking for? Browse other questions tagged .