Apex Test Classes are used for functional testing. It makes sure the written code is working fine or not. With apex test class we can test our functionality with positive as well as negative scenarios. Author : Harshal Lad
Apex Triggers is use to execute the functionality or piece of code on record manipulation ( i.e., CREATE / UPDATE / DELETE / UNDELETE records ). A trigger executes before and after an event occurs on record.