Back to articles
I built a single compile Mutation testing lib for Kotlin which runs inside your normal test suite
How-ToTools

I built a single compile Mutation testing lib for Kotlin which runs inside your normal test suite

via Dev.toAndreas Schnapp

Table of Contents Introduction to mutflow Testing existing code Correct it to pass mutation tests Final Conclusions Introduction to mutflow Hey together, I built a K2 Compiler Plugin based mutation testing library for kotlin. It is quite different from most of the other mutation libraries or frameworks. It does only include mutations for the class which is under test and also only the code you have reached within your test class. It works best if you have a good test coverage already but you want to be sure that the behavior is fully tested. It's really easy and fast to include to your project and to integrate with your current tooling. In fact it just use a JUnit extension feature which runs your tests for one test class several times (one time per tested mutation). To enable mutflow you just have to put it in your gradle plugins: plugins { kotlin ( "jvm" ) version "2.3.0" id ( "io.github.anschnapp.mutflow" ) version "0.8.0" } Maybe it's easiest to see by a little example. Testing exi

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles