function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sparkysparky 

Test Passes except during Run All Tests

What would cause a test class to pass when run on its own in Eclipse, but fail when run as part of Run All Tests in the SF UI.

Here's the test passing in Eclipse:
http://screencast.com/t/NzVhZDgxM

And here's the same test failing as part of Run All Tests:
http://screencast.com/t/ZGQ3NTljM

This is the same class in the same SF instance, run about 5 mins. apart, with no code (or anything else) changed in the interim.

Is there any proper reason this would happen, or is this a bug?

Thanks!
M.

PS I'm also seeing some odd problems with attempting to deploy code today, and am wondering if they might be related, since I'm guessing that a deploy uses a similar testing enviornment to Run All Tests.  Just a guess.
Message Edited by sparky on 11-12-2009 10:52 PM
indranily81indranily81

Hi,

 

The reason might be there are some triggers in your codebase which doesn't have test classes. When doing a run all test

the total code coverage becomes below 75%. Make sure to have test classes for all the codes and now do a run all test.

 

Thanks

Indranily81