Do your automated tests serve you well? Or does it seem like they are deliberately getting in a way, slowing down any change? Has the “given”’s preparation become an arduous journey littered with shortcuts?
Ever increasing delivery pace raises the bar for the test automation quality. Many teams are good at producing decent test coverage, but often at the price of tests maintainability – which can quickly become a bottleneck. Advanced testing frameworks like Cucumber, Spock, etc., can bring some remedy, but add own complexity and compromises.
With the help of such Kotlin features as:
- named functional parameters
- default parameter values
- and especially DSLs (Type-Safe Builders)
The expressiveness of tests can be drastically improved.
Add a modern assertion framework like AssertJ – and even the old good JUnit can become a very versatile testing tool for both unit- and functional testing.
This demo will show how to use the features of Kotlin to fight the rising complexities of the automated test data preparation. The material is based on the real-world experience of using Kotlin for developing and testing of backend micro-services (Kotlin or vanilla Java)
- Basic (unit)test writing
Mykola is a (backend) Software Engineer. Focused on progressive, continuous delivery – and therefore testing. First encountered Kotlin while working at Bol.com , and instantly fell in love with the improvements it brings to the testing side of the development.