9

I need to test a bunch of test classes. The test runs are collecting in a huge list so i do not get an overview anymore. Is there any way to clear this list?

enter image description here

Debug -> Clear seems not to work with this view.

enter image description here

And under Test i can't find any useful option for that:

enter image description here

Any ideas?

5

Each test run is a single entry in that list and is an overview. If you click the '+' next to any entry in that list, you will see all of the tests for that individual run.

As far as clearing the list, that functionality does appear to be missing from the menus and doesn't even happen when logging out/back in.

Entries: enter image description here

One Entry Open: enter image description here

1
  • 2
    I agree completely, I recall looking all over for a way to clear this list, in the developer console and in the brower's Apex Test Execution. Option is missing. Feb 6 '14 at 17:48
6

FYI - This is coming in Spring 14 - from Release Notes

Clear Test and Code Coverage Results Refresh test and code coverage results in the Developer Console by clicking Test > Clear Test Data.

4
  • 1
    That's good to know!
    – Doug B
    Feb 14 '14 at 17:03
  • There's the fix! Aug 15 '15 at 16:01
  • 7
    Test -> Clear Test Data does not clear this list unfortunately. Not sure what it does exactly.
    – Marc
    Feb 29 '16 at 8:51
  • Still the same, any suggestions?
    – BoDiE2003
    May 18 '17 at 15:08
2

Menu: Test / Clear Test Data -- followed by F5 -- works for me! on Chrome in Linux.

1

You can run the following query from Developer Console to query the current test class runs:

select id,ApexClass.Name,MethodName,FORMAT(TestTimestamp),Outcome,Message,RunTime
from ApexTestResult
where Outcome in ('Fail','Pass','CompileFail')

After executing query, select the rows you want marked for deletion, and click Delete Row button.

1
  • I have tried the accepted answer on "Clear Test Data" in both Apex Test Results and Developer Console, it still left over some test results, I have to use above query and delete those rows manually. Thanks, Kevin!
    – Estin Chin
    Jun 23 '20 at 11:36
0

As was mentioned to clear the test data and code coverage results in the Developer Console click

  1. Test -> Clear Test Data.
  2. Refresh Developer Console window (e.g., with F5 on PC)

Clear Test Data Note

Also, it was mentioned correctly that following the steps above may not clear the data instantaneously, since it takes time for the CLEAR_TEST_RESULTS command to be executed by ApexTestQueueServlet on the backend site. It means a couple of refreshes could be required.

It is possible to monitor this in Chrome Developer Console in a Network tab. enter image description here

-2

Test > Clear Test Data

https://help.salesforce.com/articleView?id=code_dev_console_tab_tests.htm&type=5

When you select this option, watch what happens in the Code Coverage pane. This doesn't do what people want, though!

According to the product team, it has been delivered: https://success.salesforce.com/ideaView?id=08730000000kpiZAAQ

Grrrrrr. Apparently, you have to wait a while for the results pane to be cleared.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.