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
How to handle installed Managed Packages failing tests?
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] (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.