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!