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
ShivaKarthikShivaKarthik 

Test class passed in Eclipse but not in Developer in console

Hi Friends...

I run a test class in eclipse and passed with coverage of 82%. If I run in apex execution, the status symbol appearing as red and the result displaying as "Could not run tests on class Class Id but if I click on the class in apex execution page the methods of test class are passing with result as Pass. 

 

What could be the reason of this kind error... Please post your comments if you have any Idea regarding this.

Best Answer chosen by Admin (Salesforce Developers) 
Abhi_TripathiAbhi_Tripathi

Hi,

 

You need to do two things when you are on page "Apex Test Execution"

 

Click on 

1.  view Test history ----> Clear Test Results  

2. Options ---->  check "Disable Parallel testing"

 


After doing above then run your test , you'll get that green check

 

 

Mark as Solution if this Helps you with kudos (Star)

All Answers

Deepa.B.AnkaliDeepa.B.Ankali

@ShivaKarthik,

 

This happens many a times. Try to clear the code coverage in org and then try. Eclipse gives accurate code coverage results.

Abhi_TripathiAbhi_Tripathi

Hi,

 

You need to do two things when you are on page "Apex Test Execution"

 

Click on 

1.  view Test history ----> Clear Test Results  

2. Options ---->  check "Disable Parallel testing"

 


After doing above then run your test , you'll get that green check

 

 

Mark as Solution if this Helps you with kudos (Star)

This was selected as the best answer
ShivaKarthikShivaKarthik
Hi Abhi, Thanks for your valuable answer. Its working fine. Could you tell me the reason why it is happening only for that particular test class? For rest of the test classes it is not showing any errors like that....
Abhi_TripathiAbhi_Tripathi

this is because of new versions introduced by salesforce, nothing to worry about. one more thing where are my kudos(Star)? :D

 

Check this link

https://success.salesforce.com/issues_view?id=a1p30000000T0FeAAK