+ Start a Discussion
ElectronElectron 

One testClass test one trigger or could test multiple triggers?

After finished my trigger and my unit test, I am starting to write my next one.

I know I should write the test class first.

 

When I run the test, my new trigger already has 56% test cover. 

The new trigger is related to same SObject, but I still think the number is not correct. 

 

So I had this idea, if these trigger works on same Object, I feel write the test method in one class seems more efficient. 

Best Answer chosen by Admin (Salesforce Developers) 
hitesh90hitesh90

Hi,

 

Yes, You can write single Test Class for multiple Triggers.

 

Thank You,

Hitesh Patel

All Answers

hitesh90hitesh90

Hi,

 

Yes, You can write single Test Class for multiple Triggers.

 

Thank You,

Hitesh Patel

This was selected as the best answer
ElectronElectron
Great, thanks so much.

This is the best community.