21

Ever since Winter 14 went into my sandbox, I'm bedeviled by Developer Console issues

  1. Test Run creates an entry in the Tests tab labeled Test @Invalid Date
  2. Once I run a test of an Apex class, clicking Test Re-Run does not actually launch a repeat of the previous test (at least no new test entry appears in the Tests tab. Manually re-selecting the class does not run it either (at least as far as the Test tab is concerned)
  3. Logs don't always appear (or rarely appear) from any tests run through the developer console; setting is 'Show My Current Logs only'
  4. Debug | Resume does nothing; no refresh of any tests or logs

Note that General Trace Settings for User are: INFO for everything except System which is ERROR. I don't see anything related to the above in SFDC Known Issues; sandbox is cs9

  • Issue#1 appears to be browser dependent. I repeated Test | New Run on Chrome and date shows correctly; problem seems related to Firefox -- clear cache/all cookies/restart had no effect on issue#1 in Firefox. – cropredy Oct 1 '13 at 1:16
  • In addition, clearing the logs does not work. If you do try and clear the logs, the list will no longer display the logs in order and you have to find the logs based on time (not in any specific order) – Eric Oct 2 '13 at 1:23
  • i kinda like Issue #1: "@Invalid Date" takes up less horizontal space than their reallllyy loooonnng date format "Wednesday, October 16, 2013 12:38:20 PM" – Scott Pelak Oct 16 '13 at 16:38
  • 3
    The developer console itself is one big bug. - I'm missing code coverage percentages - Code coverage line-by-line - Apex classes and triggers are missing from the overall coverage pane - I'm not getting the overall coverage percentage at all - The developer console gives up running tests Winter '14 has been a total headache for me. – LukeLS Oct 18 '13 at 16:20
7

OK, SFDC Support provided the workaround

  1. Test Run creates an entry in the Tests tab labeled Test @Invalid Date.

  2. Once I run a test of an Apex class, clicking Test Re-Run does not actually launch a repeat of the previous test (at least no new test entry appears in the Tests tab. Manually re-selecting the class does not run it either (at least as far as the Test tab is concerned)

  3. Logs don't always appear (or rarely appear) from any tests run through the developer console; setting is 'Show My Current Logs only'
  4. Debug | Resume does nothing; no refresh of any tests or logs

Issues 2-4 can be worked around by doing the following sequence:

  1. Test | New Run | select class(es)
  2. Test tab shows test running, test completes, Logs tab shows test log
  3. In the Test tab, double click the class that you ran (say, class 'Foo'). This opens a tab at the top of your workspace for that Test run with all classes ran in that test. You can see method-by-method test results.
  4. Test | Re-run - will execute the tests in the classes appearing in the tab from step 3

Essentially, the Developer Console 'forgot' the test classes you selected in step 1 so when you click Test | Re-run, there is nothing to re-run. By double clicking your test results, Developer Console's "memory" is jogged and it is now ready to execute your Test | Re-run.

Developer Support noted that many Dev Console issues should be fixed 'real soon'. Hopefully this will include Issue 1 which is a Firefox issue only as well as an intuitive fix for issues 2-4.

  • Unfortunately for my user only at the moment this does not work. Even when I run test from DC it never appears until I refresh, then after it appears I do step 4 and "re-run" but it still does not appear until I refresh. Sadly this is the case no matter how I run the test (including from Force.com IDE) the only way to see it in DC is to refresh it. Any other suggestions? (again this is only for my user in Sandbox at the moment, just last week stopped working properly) – Xtremefaith Apr 6 '15 at 21:08
4

Thanks for the info on #1. I filed a bug for the FF date issue.

I'm not aware of #2, but will look into it.

In terms of #3 and #4, the Developer Console has moved over to system streaming topics for logs, tests, and container deploy requests in Winter '14. In other words, instead of polling every 3 seconds to look for logs (and other stuff), we now rely on the streaming API to let us know when logs are created or certain changes happen.

If I had to guess, I would imagine that this is where the issue lies. I'm curious where the bottleneck is. The first thing to do is to see if there is a javascript error related to "cometd", which is the streaming API. If so, please file a case.

If you are receiving "cometd" network traffic (you can easily see them in chrome's network tab or FF web console tab) but the logs are still not being retrieved unless the dev console is refreshed, then there is a delay in the streaming API sending them to the dev console. In that case, you should probably also file a case.

If you do file a case, please let me the case #.

  • After several days, in FFX and Chrome, I (a) opened dev console - New Run - selected test class - Run; b) test runs, log shows; cometd traffic observed; c) click test Rerun; d) nothing happens on Dev UI at all - no test enqueued, no entry in Tests tab, nor in Log. Two cometD POSTs (110s, 58s resp time, resp.) followed by cometD POSTs every 5 secs. No cometD GETs. Will file Case – cropredy Oct 18 '13 at 21:01
  • 1
    Case# 09809329. – cropredy Oct 18 '13 at 22:06
  • 1
    Corrected case# is 09809661; previous case# is wrong – cropredy Oct 19 '13 at 0:41
0

I wanted to add some more observation on Code coverage after winter 14. Since the code coverage is moved to developer console this has also created anamolies in coverage of code.

The issue I faced is the reduction in the code coverage, after adding more methods for covering the classes.

Here is the scenario Initially the coverage is 0%. I created two methods and write the test code the value raised to 73%.

Then I added 2 more methods to cover additional classes. The overall code coverage dropped to 60%.

Afterwards to increase the coverage I added one more method the coverage reduced to 54%.

Then I realized that adding more methods in the single test class is causing this issue. The issue is that the classes are not getting copied to the Apex code coverage table. This will reduce the overall code coverage.

So to get over this issue I have split the same test class into 8 test classes with one method in each class and to my surprise each class is covered and copied to apex code coverage table and overall code coverage is increased to expected value of 85%.

I think this suggestion might be useful for someone who are facing the same issue.

0

I had come across an issue where I had test runs that were not clearing when I hit clear button.

After some digging, I found this worked for me

(Dev Console/Query Editor)

SELECT Id, ApexClassId,ApexLogId,ApexTestRunResultId,systemModStamp 
FROM ApexTestResult 
LIMIT 200

Click Execute

Select/Highlight rows, click Delete Row button

If count > 200 then repeat

for best results, when repeating process, closing the tab that got generated before re-submitting.

  • Please consider adding a detailed explanation of why this should work, "try this" is not usually a viable answer according to How to Answer. thanks – glls Sep 8 '17 at 18:42

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.