function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Richard Cave09035942158259942Richard Cave09035942158259942 

Only call the trigger you want to when running a test

We run tests that have to create multiple objects for example  we insert an account and a contact to then insert another object which we want to test calling a trigger on that object.  As we have triggers on account and contact it also calls those triggers which calls other classes and therefore the tests take longer to run.  

Any ideas on doing trigger management as the more triggers that get added in, it will get more complicated and the tests will take longer.

Use a static variable on trigger  and set it true or false from your test class.