
1 respuesta
It would help to see some of your test classes but one important thing to note is that you need to make use to Test.startTest() and Test.stopTest() methods. The idea is that any queries or DML operations that you do to setup your test should be down before the Test.startTest() method. Then when testing your code such as executing a method your are testing do that between the start and stop method calls.
This gives the unit test context. Which will basically ignore any dml or queries done outside of your start and stop testing and only count what happens in between as part of your test. Otherwise all setup code and actual test code are all considered part of the same context and thus subject to be counted towards the limits.
This link should shed some additional light on the subject: http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods