Rooster is a simple password manager for geeks. After 2 years of development, its feature set is complete and it's time to add automated tests to the mix. I'm doing that 1 test a day, over 30 days.

Why I'm testing for 30 days

A few days ago, first time Rooster contributor Dmitry V. Roenko updated deprecated serialization code and he had the awesome idea to add unit tests to his work. Oleg Yamnikov, another notable Rooster contributor behind the recent command improvements and the upcoming import command, has told me he'd like to write tests as well.

They have inspired me to start unit-testing my contributions.

So today, I'm starting the "30 Days Of Tests" challenge: each and every day for the next 30 days, I'll write 1 unit test. My hope is that it will make testing fun and digestible, whilst revealing unnoticed bugs and making it easier to contribute unit tested code to Rooster.

Implemented tests

Until September 10th 2017, I'll update this article daily with a link to the most recent unit-test and what I've learned from that unit-test. Here we go:


33 days later, here we are. Rooster has now 30 tests (unit and integration).

But wait, why 33 days?

Well, running this challenge during vacation wasn't the smartest idea. So I ended up being a bit late a times. But, having the goal of 1 test a day was still a good way to build up a nice set of tests.

And now, we can run Rooster's tests with cargo test and ./ whenever we need to check whether an upgrade broke anything.

And that's pretty awesome!