- Can now define the minimum_coverage_by_file, maximum_coverage_drop and refuse_coverage_drop by branch as well as line coverage
The "JSON formatter" release. Starting now a JSON formatter is included by default in the release. This is mostly done for Code Climate reasons, you can find more details in this issue.
Shipping with so much by default is sub-optimal, we know. It's the long term plan to also provide
simplecov-core without the HTML or JSON formatters for those who don't need them/for other formatters to rely on.
simplecov_json_formatterincluded by default (docs), this should enable the Code Climate test reporter to work again once it's updated
- invalidate internal cache after switching
SimpleCov.root, should help with some bugs
- No more warnings triggered by
enable_for_subprocesses. Thanks to @mame
- Avoid trying to patch
Process.forkwhen it isn't available. Thanks to @MSP-Greg
- Dropped support for Ruby 2.4, it reached EOL
- observe forked processes (enable with SimpleCov.enable_for_subprocesses). See #881, thanks to @robotdana
- SimpleCov distinguishes better that it stopped processing because of a previous error vs. SimpleCov is the originator of said error due to coverage requirements.
- Changing the
SimpleCov.rootcombined with the root filtering didn't work. Now they do! Thanks to @deivid-rodriguez and see #894
- in parallel test execution it could happen that the last coverage result was written to disk when it didn't complete yet, changed to only write it once it's the final result
- if you run parallel tests only the final process will report violations of the configured test coverage, not all previous processes
- changed the parallel_tests merging mechanisms to do the waiting always in the last process, should reduce race conditions
- The repo has moved to https://github.com/simplecov-ruby/simplecov - everything stays the same, redirects should work but you might wanna update anyhow
- The primary development branch is now
masteranymore. If you get simplecov directly from github change your reference. For a while
masterwill still be occasionally updated but that's no long term solion.
Can you guess? Another bugfix release!
- minitest won't crash if SimpleCov isn't loaded - aka don't execute SimpleCov code in the minitest plugin if SimpleCov isn't loaded. Thanks to @edariedl for the report of the peculiar problem in #877.
Another small bugfix release
- SimpleCov will run again correctly when used with rspec-rails. The excellent bug report #873 by @odlp perfectly details what went wrong. Thanks to @adam12 for the fix #874.
Small bugfix release. It's especially recommended to upgrade simplecov-html as well because of bugs in the 0.12.0 release.
- Fix a regression related to file encodings as special characters were missing. Furthermore we now respect the magic
# encoding: ...comment and read files in the right encoding. Thanks (@Tietew) - see #866
Minitest.after_runhook to trigger post-run hooks if
Minitestis present. See #756 and #855 thanks (@adam12)
Small release just to allow you to use the new simplecov-html.
- Relax simplecov-html requirement so that you're able to use 0.12.0
Small Bugfix release.
- Just putting
# :nocov:on top of a file or having an uneven number of them in general works again and acts as if ignoring until the end of the file. See #846 and thanks @DannyBen for the report.
Huge release! Highlights are support for branch coverage (Ruby 2.5+) and dropping support for EOL'ed Ruby versions (< 2.4). Please also read the other beta patch notes.
You can run with branch coverage by putting
enable_coverage :branch into your SimpleCov configuration (like the
SimpleCov.start do .. end block)
- You can now define the minimum expected coverage by criterion like
minimum_coverage line: 90, branch: 80
- Memoized some internal data structures that didn't change to reduce SimpleCov overhead
SourceFilenow have a
coveragemethod that returns a hash that points from a coverage criterion to a
CoverageStatisticsobject for uniform access to overall coverage statistics for both line and branch coverage
- we were losing precision by rounding the covered strength early, that has been removed. For Formatters this also means that you may need to round it yourself now.
- Removed an inconsistency in how we treat skipped vs. irrelevant lines (see #565) - SimpleCov's definition of 100% is now "You covered everything that you could" so if coverage is 0/0 that's counted as a 100% no matter if the lines were irrelevant or ignored/skipped
FileListstopped inheriting from Array, it includes Enumerable so if you didn't use Array specific methods on it in formatters you should be fine
- We needed to change an internal file format, which we use for merging across processes, to accommodate branch coverage. Sadly CodeClimate chose to use this file to report test coverage. Until a resolution is found the code climate test reporter won't work with SimpleCov for 0.18+, see this issue on the test reporter.
- Instead of ignoring old
.resultset.jsons that are inside the merge timeout, adapt and respect them
- Remove the constant warning printing if you still have a
.resultset.jsonin pre 0.18 layout that is within your merge timeout
- only turn on the requested coverage criteria (when activating branch coverage before SimpleCov would also instruct Ruby to take Method coverage)
- Change how branch coverage is displayed, now it's
branch_type: hit_countwhich should be more self explanatory. See #830 for an example and feel free to give feedback!
- Allow early running exit tasks and avoid the
at_exithook through the
SimpleCov.run_exit_tasks!method. (thanks @macumber)
- Allow manual collation of result sets through the
SimpleCov.collateentrypoint. See the README for more details (thanks @ticky)
case, even if there is no
elsebranch declared show missing coverage for it (aka no branch of it). See #825
- Stop symbolizing all keys when loading cache (should lead to be faster and consume less memory)
- Cache whether we can use/are using branch coverage (should be slightly faster)
- Fix a crash that happened when an old version of our internal cache file
.resultset.jsonwas still present
This is a huge release highlighted by changing our support for ruby versions to 2.4+ (so things that aren't EOL'ed) and finally adding branch coverage support!
This release is still beta because we'd love for you to test out branch coverage and get your feedback before doing a full release.
- Dropped support for all EOL'ed rubies meaning we only support 2.4+. Simplecov can no longer be installed on older rubies, but older simplecov releases should still work. (thanks @deivid-rodriguez)
- Dropped the
rake simplecovtask that "magically" integreated with rails. It was always undocumented, caused some issues and had some issues. Use the integration as described in the README please :)
- Branch coverage is here! Please try it out and test it! You can activate it with
enable_coverage :branch. See the README for more details. This is thanks to a bunch of people most notably @som4ik, @tycooon, @stepozer, @klyonrad and your humble maintainers also contributed ;)
- If the minimum coverage is set to be greater than 100, a warning will be shown. See #737 (thanks @belfazt)
- Add a configuration option to disable the printing of non-successful exit statuses. See #747 (thanks @JacobEvelyn)
- Calculating 100% coverage is now stricter, so 100% means 100%. See #680 thanks @gleseur
- Add new instance of
MiniTestconstant (with the capital T) will be removed in the next major release of Minitest. See #757 (thanks @adam12)
Looking for older changelogs? Please check the old Changelog