+ Start a Discussion

Apex Unit Tests

I created unit tests for triggers and classes.

To view test coverage:

Eclipse -> Project- > src -> unpackaged -> classes -> Force.com -> run tests.
Under Failures and warnings and under general warnings it was showing 64% completed but 75 % test coverage is required.
Then I added one more test in a class as I am trying to reach for at least 85% test coverage but now when I right click to run tests I am seeing few failures and warnings but not seeing the the general warnings tab as before.

What does it mean? How can I see what percentage I have covered?

Colin LoretzColin Loretz
Usually the General Warnings section disappears once the overall code coverage exceeds 75%.

Below the Failures & Warnings (with the red !), you should see a "Code Coverage" section (with a yellow !).

Open "Code Coverage" with the arrow and it should have a list of the triggers and classes with their respective % covered. IE: triggerTester(ApexClass) -- 0 Lines not tested, 100% covered

Good luck!

Message Edited by Colin Loretz on 11-23-2008 03:54 PM