# Kotlin&Junit vs Groovy&Spock

**URL:** <https://discuss.kotlinlang.org/t/kotlin-junit-vs-groovy-spock/24767>\
**Category:** Web Development\
**Created:** [May 4, 2022, 1:02pm UTC](https://discuss.kotlinlang.org/t/kotlin-junit-vs-groovy-spock/24767 "2022-05-04T13:02:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capt.roof](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@capt.roof](https://discuss.kotlinlang.org/u/capt.roof)\
**Post date:** [May 4, 2022, 1:02pm UTC](https://discuss.kotlinlang.org/t/kotlin-junit-vs-groovy-spock/24767/1 "2022-05-04T13:02:06Z")

</div>

Hi, We are in the team at the moment of choosing the method and language of testing the application. The fight continues between Kotlin + Junit + Mockk vs Groovy + Spock. For the convenience of writing, the fact that Junit is always tested with the latest version of Java on CI - Kotlin has my vote, but maybe there is something else that will speak for Kotlin + Junit?  
What’s your opinion? We would like the actual unit tests to prevail over the heavy integration and contract tests, and here, too, it seems to me that the junit with kotlin will be faster and better -even in such cases as creating test data - you wont need to add additional builders, and you will be able to take advantage of the kotlin named arguments.  
I know that the topic is not strictly related to the language, but I am looking for as many arguments as possible for Kotlin to win this duel 🙂

---

<div class="post-metadata">

**Author:** ![madmax1028](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/madmax1028/32/3335_2.png) [@madmax1028](https://discuss.kotlinlang.org/u/madmax1028)\
**Post date:** [May 4, 2022, 2:17pm UTC](https://discuss.kotlinlang.org/t/kotlin-junit-vs-groovy-spock/24767/2 "2022-05-04T14:17:45Z")

</div>

Personally I would go with Kotlin + Kotest + MockK. As for the Spock’s selling feature in detailed assert errors you can try this [kotlin-power-assert](https://github.com/bnorm/kotlin-power-assert) plugin.
