Cash App Oct 30, 2024

Kotlin Multiplatform parameterized tests with Burst

Article Summary

Cash App just open-sourced Burst 2.0, bringing parameterized testing to Kotlin Multiplatform. No more writing the same test multiple times for different inputs.

Jesse Wilson from Cash App announced Burst 2.0, a Gradle plugin that fills a major gap in Kotlin Multiplatform testing. While JUnit has had parameterized tests for years (via Burst 1.0, TestParameterInjector, and @ParameterizedTest), KMP projects have been missing this capability until now.

Key Takeaways

Critical Insight

Burst 2.0 brings parameterized testing to Kotlin Multiplatform, letting you write one test and run it across multiple algorithms, inputs, and environments automatically.

The article shows a clean WebServerTest example that tests HTTP/1, HTTP/2, and HTTP/3 protocols with just a few lines of code.

Recent from Cash App

Related Articles