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

Testing in Eclipse: additional triggers included
Hi,
I am writing a test script in an apex vf extension. when I run the tests in eclipse, the test also calls a trigger which I didn't select and which is absolutely not called from the script, since it covers a different object.
When I call the same test from the online development environment, the additional trigger is not mentioned and the test covers all coding.
Can anybody explain why this additional trigger might be included in the test?
Thanks.
Is the trigger really called, or does it show up as 0% covered or similar?
I've found that even when running the tests from a single class in eclipse, it produces full details on the coverage of all triggers/classes.
Are the triggers that aren't included in the Errors & Warnings list executed by your test (e.g. when creating test data etc) - you should be able to see if they are by expanding the Code Coverage Results list below the Errors & Warnings. The ones that appear in my list are those which aren't executed (directly or otherwise) by my test.
the unneeded triggers are mentioned both in the warnings list (<1% coverage) and in the code coverage results, stating 0% coverage. this is correct, since there is no test method for that trigger yet.it is not in the debug log. and remember, when I do the test from the online development environment, the additional triggers do not appear!
another trigger, which is correctly called since I insert a triggering object in my testmethod, is not metnioned in the error list and has 100% coverage in the code coverage results.
Sounds like the Eclipse version always produces a full report, while the online version only reports on classes/triggers that were actually reached from the test script. That mirrors my experience, though I've not really thought about it before.
Maybe the Spring 10 Eclipse will be better at this, should it ever be released :)