Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report format for Rubymine support #95

Closed
conradwt opened this issue Nov 13, 2011 · 7 comments
Closed

Report format for Rubymine support #95

conradwt opened this issue Nov 13, 2011 · 7 comments

Comments

@conradwt
Copy link

Hi, could someone tell me what version of simplecov works with Rubymine? One of the developers mentioned on a bug that the report format was changed. Rubymine doesn't understand how to properly parse it. I would like to spend sometime resolving this issue. Thus, does anyone have information on simplecov's report format (i.e. current as well as previous)?

Thanks,

-Conrad

@colszowka
Copy link
Collaborator

Hi Conrad, it seems that Rubymine parses the HTML report, which has seen a lot of changes in the 0.5 branch - see https://github.com/colszowka/simplecov-html/commits/master

I think if you go with a 0.4 version, you should be fine. I think the best thing for Rubymine would be to implement a custom formatter that gets the reported data in some serialized format (xml, json, whatever works best for it) so it can be independent of changes to simplecov html markup modifications. You could check out the bundled simplecov-html or simplecov-rcov, a 3rd-party formatter that puts out RCov-style output to make SimpleCov work with the RCov plugin for Jenkins CI.

@conradwt
Copy link
Author

Chris, it appears that Rubymine (RM) team has forked mintiest-reporters and added support for RM. Thus, it's very close to complete and I have been playing with it using Minitest and MinitestSpec. Also, I have tried 0.4.x version of simplecov prior to the current RM version and I was experiencing the same issues.

@macedo
Copy link

macedo commented Jan 26, 2012

Hi Conrad, do you got something about this? I'm having the same problem that you.

@colszowka
Copy link
Collaborator

Updated the title. Would be great to hear if you guys figured something out about this.

@conradwt
Copy link
Author

OK, here's what's currently working with Rubymine (RM) v112.477 in regards to testing and code coverage:

  • running mintiest and minitest specs using Control-R (generates test results in the right output window and test output in the left. This requires the installation of mintiest-reporters ~> 0.5.0.
  • SimpleCov support has regressed a bit because I was able to generate a CoverageReport that was a bit off in a prior release but now I'm seeing a parse error within the first beta. Here's the bug reports:

Current Issue - http://youtrack.jetbrains.com/issue/RUBY-10295?projectKey=RUBY&query=simplecov
Previous Issue - http://youtrack.jetbrains.com/issue/RUBY-9927?projectKey=RUBY&query=simplecov

Next, somewhere in between Previous issue and Current Issue things were really really close in regards to code coverage. Furthermore, I'm not seeing the parse error with RSpec but it generates an empty code coverage report.

Last but not least, filters are not working the way one expect. For example, I would simply like to create a whitelist of all the things I would like SimpleCov to perform code coverage. However, the in IDE generates code coverage percentages for almost every file.

Serge of Jetbrains,

Currently filters don't work for simplecov (but works for rcov gem). Simplecov gem supports only "exclude" patterns, so in next 4.0 EAP you can exclude all folders except "lib", e.g.:

@colszowka Is this true?

@sheldonh
Copy link

Just a heads up. simplecov is working absolutely perfectly for me with RubyMine 4.5.2 (build #RM-119.46).

The only gotcha is that I need to "Run all specs in: " the project root. If I "Run all specs in: specs", RM doesn't pick up the coverage, because it ends up in ./spec/coverage instead of ./spec.

I'm happy to consider that a user issue. ;-)

@colszowka
Copy link
Collaborator

@sheldonh Glad to hear that. The subdir problem probably comes from SimpleCov picking up the current working directory the test suite has been started in. You can set this with SimpleCov.root(Rails.root) when Rails is available, or something else left as an excercise for the reader if not :)

Closing this issue as the guys at Jetbrains seem to have sorted it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants