I am using Kotlin 1.0.3 for Android Development in Unit Testing but when I try to run a single test it runs all tests of the class. Does anyone know how to avoid that behaviour?
To run tests for all targets, run the check task. To run tests for a particular target suitable for testing, run a test task <targetName>Test .
Unit tests run on your local machine only. These tests are compiled to run locally on the Java Virtual Machine (JVM) to minimize execution time. If your tests depend on objects in the Android framework, we recommend using Robolectric.
There's an issue with the IntelliJ Platform that causes the tests for the entire class to be executed if you try to run a single test method and have an existing run configuration for the entire class.
To run a single method, you need to delete the configuration for the entire class using the Run | Edit Configurations... action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With