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
swathi medak 9swathi medak 9 

code coverage all tests not showing

I have written a test class for which it is showing 45% coverage, when i clicked on the code coverage to see what part of my code is not tested, the option is none and i cant see all tests option also i cannot see the blue and red coloured highlights in my test class? how can i see the coloured highlights and how can i get the all tests option?
THANKS!
Best Answer chosen by swathi medak 9
Ravi Dutt SharmaRavi Dutt Sharma
Found this, you can try this and see if it helps:
https://help.salesforce.com/articleView?id=000331049&type=1&mode=1 (https://help.salesforce.com/articleView?id=000331049&type=1&mode=1)

All Answers

Ravi Dutt SharmaRavi Dutt Sharma
Hi Swathi,

In the developer console, click on the Test tab. Then run your test class. Once the execution is completed, open you main class from the Overall code coverage section present in the bottom right. If you open the main class in this way, it will show the lines covered in blue and lines not covered in red.

User-added image
Ajay K DubediAjay K Dubedi
Hi Swathi,

You can get them back by selecting the 'Test > Always Run Asynchronously' checkbox and re-running your test.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
swathi medak 9swathi medak 9
hi ravi,
thanks i tried re-running the test and opened the main class from overall code coverage , but still its not showing the lines executed in blue.
swathi medak 9swathi medak 9
Hi Ajay, i have searched it online and check the button always run asynchronously , not working! Thanks
Ravi Dutt SharmaRavi Dutt Sharma
Found this, you can try this and see if it helps:
https://help.salesforce.com/articleView?id=000331049&type=1&mode=1 (https://help.salesforce.com/articleView?id=000331049&type=1&mode=1)
This was selected as the best answer
swathi medak 9swathi medak 9
thanks ravi, by disabling the store only 'aggregated code coverage' in apex test execution from setup, i am able to see the coloured coverage.
Deepali KulshresthaDeepali Kulshrestha
Hi swathi,
Greetings to you!

- Go to the 'Apex Test Execution'and in option select list deselect the 'Store Only Aggregated Code Coverage' checkbox. 
User-added image
    
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha.