Ensuring that your Apex classes and triggers work as expected.
-Having a suite of regression tests that can be rerun every time classes and triggers are updated to ensure that future updates you make to your app don’t break existing functionality.
-Meeting the code coverage requirements for deploying Apex to production or distributing Apex to customers via packages.