I have a project I want to get code coverage on. It's just a standard JRuby project not on Rails and I was wondering how to get RCov to work. I have been trying for a long time to get results and I just don't know whats going on. I get a coverage folder to get displayed but all the files either get loaderrors on requires or the files that get loaded just don't say they've been tested at all (which I know in one case is balooney since I made a test spec for it). Can anyone explain to me how to get RCov to work or why I am getting the attached error? I don't understand how/why you are supposed to do a -I for included libraries or what the point of that is. From what I've been doing so far I have been just running rcov spec/.rb from my main appcode directory and that generates my coverage folder and : rcov spec/.rb /home/ben/.rvm/gems/jruby-1.6.8/gems/rcov-0.9.11-java/lib/rcov/differential_analyzer.rb:31 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag NoMethodError: undefined method `describe' for main:Object (root) at ./spec/ncrf_spec.rb:3
1
There are 1 best solutions below
Related Questions in RUBY
- how to integrate cashfree payment gateway in ruby on rails project
- RSpec Capybara throwing Selenium error when trying to click a button with browser confirm
- Duplicate GET requests - Rails & Heroku
- convert csv file with json data inside to a column, rows table in 2nd csv file
- Installing dependencies from a gemspec file
- Verifying Google Identity OAuth2 token with Ruby
- Java code of AES/GCM/NoPadding encryption algorithm with authentication tag
- How to fix error in model with gem lockbox
- Cannot install Ruby Gem on Window
- use logstash filter ,aes gcm encrypted in ruby,but cannot decrypted in java
- In Rails 7, what is the right ActiveRecord callback to use if I need to prevent (or rollback) persistance on error?
- How can I go through an array and still remove elements from it
- Nokogiri only returning 5 results
- How do I get the fullscreen mode in firefox?
- undefined group option when using branch reset group regex in Ruby
Related Questions in UNIT-TESTING
- Google Truth.assertThat.contains does not behave similar to List.contains
- What's the best way to breakup a large test in pytest
- How to refer to the filepath of test data in test sourcecode?
- How to mock a dynamic endpoint in Apache Camel Spring Boot
- pytest mock failing when mocking function from imported package
- Jest configuration error while running test case in teamcity
- Resolve paths dynamically based on directory where test (or tested files) is located in Jest
- One-time implementation with Jest's mockResolvedValueOnce within test remains from one test to another
- Why can't I mock the decorator of the function?
- Gitlab pipeline stuck with nx cloud issue
- How to create an improperly closed gzip file using python?
- Nest.js service structure for API integration
- uiState not updating in Tests
- Unit Tests not Compiling or Being found without mod tests in main.rs. Is this a requirement or am I missing some configuration?
- Mocking Stream or Reader in Java Junit
Related Questions in RSPEC
- How to stub out current_user in JWT model for Rspec?
- Stubbing and extending a class "rspec style"
- Update record in test db for rspec
- How to run Rails 7 tests or RSpec without recreating test DBs
- Naming conventions for rspec tests with zeitwerk expecting model_spec.rb to define constant ModalSpec
- RSPEC 6.1.2 and Rails 7.1.3: Could not find a JavaScript runtime
- Factorybot Rspec Error on factory failing 'update_attribute' on create
- RSpec test failing because of file field
- How to prevent ActiveRecord from making an associated record in a callback before it is saved?
- Run skipped rspec tests and fail if they pass
- RSwag `consumes` method does work in RSpec context
- Python Kivy Not Exporting to APK
- Error when running RSpec tests: "FrozenError: can't modify frozen Array"
- How to fix a bundler error when upgrading Ruby from version 2.7.5 to version 3.0.6?
- How to make AmazingPrint the default formatter for debugging sessions in RSpec
Related Questions in TDD
- How can I return self from a method mocked using mockall?
- Should I add the nupkg dependencies of the Assembly of the SUT to the Test Project as well?
- Testing DAO Methods in Java: Fake Implementations vs. In-Memory Databases
- Unable to consume message - MassTransit with ActiveMQ Artemis
- Make a Unit Test E2E for Blazor Web App in .NET 8 Backend
- I'm having this error in my app ruby on rails
- Setting up/using a session in a phpunit test
- Unit test framework for .net maui hybrid blazor app with .net 8 and target Android and Windows
- CMock's behaviour for IgnoreAndReturn
- How can I use a NSPredicate to evaluate boolean expressions in an asynchronous test?
- Testing Cerner CCL Query Data with Oracle's Unit Testing Framework
- Why should I use triangulation instead of just randomized values in my tests?
- React reactive values in unit tests
- Is Test Driven Development possible in jetpack compose?
- Rails tests are passing but server refuses to start on production due to syntax error
Related Questions in RCOV
- Column name for timestamps in xts format and the highfrequency package
- Realized covariance estimator
- simplecov-rcov is throwing a Encoding::UndefinedConversionError
- Trace only class under test with rcov
- Rcov report index file wasn't found in jenkins
- RCOV underreporting when running the entire spec vs running individual spec file
- Error while executing the rcov report, rails stats report and brakeman warnings from Jenkins
- When trying to run Rcov with Rails 3 application, I am getting this error
- Using SimpleCov with nginx and passenger
- What's the difference between "total coverage" and "code coverage" in rcov?
- Rails + Capybara-webkit – javascript code coverage?
- How do I remove old rcov results from Jenkins?
- RCov with JRuby
- Integrate rcov with Sublime Text 2 Ruby Tests
- Rcov showing spec'd methods as not covered
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
RCov is strictly limited to Matz's reference implemenation of Ruby (MRI) 1.8.x and doesn't even work on MRI 1.9.x.
SimpleCov is the new way to go, as it uses the new Ruby Coverage API. This API for a while was not supported by JRuby, or at least not to an extent that it was usable in production. The original issue on SimpleCov's bugtracker doesn't state explicitly that it works now. However, the issue they files in the JRuby tracker about this Ruby Coverage API not working correctly states that this issue is now resolved.
I guess you should try your luck with the latest versions of both JRuby and SimpleCov.
On the other topic:
Ruby's
-Iflag adds directories to the$LOAD_PATHarray which defines the locations in which.rbfiles are searched when you try to load them withrequire. As of Ruby 1.9.x files can only be found when they are in one of the directories in$LOAD_PATHand are no longer also found relative to the current working directory of your Ruby process.