You write your local unit test class as a JUnit 4 test class. To do so, create a class that contains one or more test methods, usually in module-name/src/test/ . A test method begins with the @Test annotation and contains the code to exercise and verify a single aspect of the component that you want to test.
Read moreHow do I run a single test case in IntelliJ?
Run Single Test Case with Maven Follow Without Maven, you can right-click on a test class/method in IntelliJ and select “Run…” (or “Debug…” for that matter) and it automatically compiles and runs just what you’ve selected.
Read moreHow do you use kotlin test?
Add dependencies
Read moreHow do I run code in IntelliJ Kotlin?
Run your code from IntelliJ IDEA.
Read more