+ Start a Discussion

test coverage issue


There are all kinds of no no's in your test class and trigger:


SOQL of entire objects without limits

Hardcoded ID's

seeAllData = true




But for your initial question, when you select the class and select run test, after it has executed, scroll down to the trigger you are seeking and see what it says for coverage. click on the code coverage percent and it will tell you what lines are not covered.


This WILL NOT set the percent coverage when viewing apex classes. to do that you have to run the test via Apex Test Execution under Setup -> Develop -> Test Execution.


Lets start there. Also, when clicking run test, does it pass or fail?



Jaffer Ali.Jaffer Ali.

Try to make a negative case where you will receive some sort of exception . May be you can develop a code to associate inactive user Id so you will receive an exception as a result.


Jaffer Ali.Jaffer Ali.

In test class Im able to see hardoded Id.What is the reson for that ? It  will change in production so what would you do then?