Away With the Boilerplate!

About a year and a half ago, I audited an Android project for a client. One of the glaring observations was that the test coverage was quite poor.

To improve the test coverage, I had to write a lot of code. A lot. Since I’ve written plenty of unit tests before, and knew I’d be writing a lot more after, I made a decision. Given how every unit test followed the same pattern, I decided to automate the process. TestIt was born. I’ve never looked back since.

TestIt is a unit test boilerplate generator for Kotlin. It analyses the code for you, finds testable code and generates a set of Given/When/Then test templates for it. All you have to do is fill in the logic of the underlying code.

The project is open sourced, so feel free to contribute to it. Maybe it will inspire you to develop a similar one for another language. If it does, let me know!

Published by eranboudjnah

A software consultant and tech lead. Passionate about optimizing as many aspects of my life as possible, to free time for what really matters.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: