Code coverage not working for me

I've never gotten code coverage to work in IDEA 6 (using the pre-release or the latest revision: 5784) on OS X (10.4.8 running latest Java 5 build). I go into the "Code Coverage" tab of the "Run" dialog and add the package I want to monitor, ensuring that the two check boxes are set (see attachment). I run the project. I then select Analyze | Code Coverage Data and select the coverage data (see attachement). And... absolutely nothing happens. I see no code coverage statistics in the project view nor do I see any highlighted lines in any of my source code files.

I've searched JIRA and the forums for some mention of this issue but... nothing. Any ideas what's going wrong?



Attachment(s):
coverage2.png
coverage.png
9 comments

Hello Ben,

Please examine your left gutter. There should be green/red/yellow markers.
(Check your color scheme for used colors)

Sometimes I notice a bar above the editor with warning that my coverage data
is outdated. May be it is your case?

Do you see smth like this?

Thank you.

P.S. if nothing really happens could you please look to the log (IntelliJIDEA6.0/system/logs)
...

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

I've never gotten code coverage to work in IDEA 6 (using the
pre-release or the latest revision: 5784) on OS X (10.4.8 running
latest Java 5 build). I go into the "Code Coverage" tab of the "Run"
dialog and add the package I want to monitor, ensuring that the two
check boxes are set (see attachment). I run the project. I then select
Analyze | Code Coverage Data and select the coverage data (see
attachement). And... absolutely nothing happens. I see no code
coverage statistics in the project view nor do I see any highlighted
lines in any of my source code files.

I've searched JIRA and the forums for some mention of this issue
but... nothing. Any ideas what's going wrong?





0

Hi, Anna. I've got a similar problem. Most of the output looks normal. At the top, it says

EMMA: collecting runtime coverage data ...
EMMA: runtime controller started on port
2 test classes found in package 'com.example.package'

And then proceeds to have a good test run. At the bottom I see this, which seems to be a sign of the problem:

raw session data merged into {in 59 ms}

As you can see, the first letter of each path item has been removed, and it looks like two directories are smooshed together. The actual project root would be

/home/username/workspace/project/

and the IDEA config files are in

/home/username/.IntelliJIdea60/

This is under an up-to-date Ubuntu Linux install with Sun's 1.5.0_09 JDK for the project target.

Any help would be appreciated.

0

William,
Did you try the latest 6.0.2 EAP? Also does your project's name contain spaces in it?

0

Thanks for the quick reply.

I haven't tried it. Where would I find it? This link only has 6.0.1:

http://intellij.net/eap/

Also, the project name does not have spaces in it, and there are no spaces in the rest of the path, either.

0

Hello William,

WP> Thanks for the quick reply.
WP>
WP> I haven't tried it. Where would I find it? This link only has 6.0.1:
WP>
WP> http://intellij.net/eap/

http://www.jetbrains.net/confluence/display/IDEADEV/6.0.2+EAP

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Ok. Thanks to Dmitry, I have tried 6.0.2 and it still has this problem. The suspect line, slightly modified to remove client info, is

raw session data merged into {in 23 ms}

Again, no spaces were in the original path.

Let me know what else you'd like me to try.

0

Ah, I found the coverage data I mentioned initially. It is in

./\/home/user/.IntelliJIdea60/system/coverage/billing$com.example in billing.es\

Yes, with backslashes in the path.

And you're correct, that misplacing of the data appears to be fixed in 6.0.2. The path printed in the console is still missing the spaces, but that's a red herring.

I'm still getting inconsistent results; some of my tests don't seem to be saving any coverage data, but one run just worked fine, so I'll dig into this more. But it's definitely a step forward, thanks.

0

Dmitry,

I didn't count, but you have posted this link at least ten times now.
Wouldn't it be much easier (for us and for you) to change the EAP link
to point to the latest EAP version? Is there any reason why not?

Regards,
Martin

Dmitry Jemerov wrote:

Hello William,

WP> Thanks for the quick reply.
WP> WP> I haven't tried it. Where would I find it? This link only has
6.0.1:
WP> WP> http://intellij.net/eap/

http://www.jetbrains.net/confluence/display/IDEADEV/6.0.2+EAP


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0

Hello Martin,

MF> I didn't count, but you have posted this link at least ten times
MF> now. Wouldn't it be much easier (for us and for you) to change the
MF> EAP link to point to the latest EAP version? Is there any reason why
MF> not?

Well, the only reason is that I don't have direct access to the intellij.net/eap
server, so changing the link is a bit more cumbersome than posting a newsgroup
message. :) But I guess it isn't really much of an excuse. :)

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.