Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kotlin-test vs kotlin-test-junit

I have a kotlin project that is compiled to java. My test library is junit. Im using maven as my dependency management and Intellij IDEA. recently I got that strange warning in my pom.

Inspection info: If you have kotlin-test and junit dependency then most likely you better to include kotlin-test-junit instead of just kotlin-test

What is the difference between kotlin-test and kotlin-test-junit?

from what I read it seems that kotlin-test is not deprecated, so Why did intellij recommend kotlin-test-junit instead of kotlin-test?

enter image description here

like image 662
yonBav Avatar asked Jan 01 '26 06:01

yonBav


1 Answers

So I found the answer here (I don't understand how I missed it in my first search)

In short kotlin-test library provides a set of annotations and utility functions independently of the test framework.

Where kotlin-test-junit library provides an implementation on top of Junit Asserter and the annotations and utility functions kotlin-test provides.

like image 63
yonBav Avatar answered Jan 03 '26 10:01

yonBav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!