Recently the Cats project has started using codecov.io to track test coverage of our project. As of writing our tests cover about 48% of the core subproject.
One of the benefits that we get from pure functional programming is that there are fewer ways to make mistakes. Nonetheless, we value having a robust test suite which exercises and verifies the properties of our code.
Writing tests is a great way to get involved with the Cats project! The project currently marks test-related issues with a testing label, and we use an in-progress label to signal that someone is working on the issue.
I would like to see every file in the core subproject get to (at least) 80% test coverage.
For the next two-weeks, every person who successfully adds tests to push a file above 80% will receive a personal cat picture hand-drawn by me (Erik Osheim) with a note. (You will also have the thanks of the Cats community.)
Here's a link to the current coverage levels for core.
If you want to participate, claim an existing issue (or open a new one) with a comment that you are working on it. You should also check to ensure someone else hasn't already claimed that file (or if you aren't sure, comment and ask).
If you want help with writing tests, or have other questions (such as where to start), feel free to ask in the Cats Gitter channel or post a comment on the issue.
There are a few caveats:
- The PR needs to be submitted within the two weeks (before Wednesday, June 24, 2015), although it's fine to continue working on it to respond to feedback (if it hasn't been merged by the deadline).
- You'll need to give me a mailing address to send the picture to (email [email protected]). If you'd prefer a digital copy I can send you that instead.
- One picture per person please.
- It might take me awhile to get all the drawings done and sent, depending on how many people participate.
- I'd like to focus on core but will accept coverage of other projects too.
- I will also accept patches that improve the Contributor's Guide to make it clearer how to contribute tests (as well as how to run them and measure coverage).
Special thanks to Alistair Johnson for proposing that we track code coverage, and for the pull request that added this feature.