When running testMethods which test logic I've built to interact with a managed package, it seems the triggers in the managed package are not firing, therefore I cannot test if my trigger is interacting with the managed package correctly...

Is this true? Any ways around it?

  • This is not what i would call normal behaviour no, can you elaborate on what your doing and what gives you this impression? Mar 29, 2014 at 8:52
  • During my implementation of a CPQ tool, I found I needed to flip a checkbox off/on on the contract when a co-termed opportunity was won (this off/on would refresh/sync the renewal opportunity out in the future). I wrote a trigger to facilitate this. During unit testing, when I create a quote and quote lines from an opportunity, the CPQ module is supposed to copy those quotes lines to become opportunity products, and this is not happening at all (even many steps later, so order of execution isn't an issue). Perhaps @user2446975 is correct in that they turn off their triggers during tests. Mar 29, 2014 at 15:30
  • 1
    Yes perhaps this may be the explanation, it seems an odd practice since they themselves would not get coverage in their own tests needed to gain coverage for packaging. Have you considered contacting the vendor? Mar 31, 2014 at 9:09
  • In the process of contacting them. Wasn't sure if this was expected behavior or not (couldn't figure out why it would be, but worth an ask...) Mar 31, 2014 at 14:15

1 Answer 1


I think that all triggers are executed [The order of execution isn’t guaranteed when having multiple triggers for the same object due to the same event.] Your trigger can executed before trigger from managed package.

The other possibility is that this particular managed package has some additional code for disabling this trigger in managed package during yours unit tests - for example using static resources - look at slide 21.

Probably you should look into debug log.

You must log in to answer this question.

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