You need to sign in to do that
Don't have an account?

Test class does not run in UI, but completes in IDE - what is its true coverage?
Some test classes you cannot run through UI, but can through IDE. How do such test classes affect the total code coverage percentage for the org? Are they seen as having 0% coverage, or whatever the IDE says they cover (95% for example)?
MIXED_DML_OPERATION, DML operation on setup object is not permitted Error
Just use runAs in your test method , this will fix the issue.
Once there are no errors then you can refer to eclipse or console for actual code coverage.
1. It existing differnece between code coverage calcuator of Saleforce UI and IDE plug in. UI should be considered correctly.
2. MIXED_DML_OPERATION error is coming as you are trying to insert setup and non setup objects in single flow.
+ Sandeep suggestion,
A "setup" object is one that must be edited from the setup or builder area of the platform. These object include the User object, Ogranization object, Email templates and so on.
See this article for details DML operations of a non-setup sObject and a setup sObject
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_dml_non_mix_sobjects.htm?SearchType=Stem
Thanks,
Subhani,
Salesforce Certified Developer,
www.mydbsync.com