I am writing tests for my apex classes. Usually I can test each test class individually from the developer console.

enter image description here

When I run the idividual test my code coverage is 0% even if the class passed.

My only option is to go through Setup|Apex Classes|Run All Tests enter image description here

When I edit the test class I lose all my test coverage.

Is there anyway I can set it up so I can test each class individually without losing my entire test coverage and not have to navigate to the Run All Tests?


I believe you are not storing individual test coverage.

Go to Apex test execution, click options button, make sure you have unchecked store aggregate test coverage.

Apex Test execution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.