• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The official Kotest plugin for Intellij and Android Studio

kotest-intellij-plugin

build-master intellij-badge Downloads Rating

The official Kotest plugin for Intellij and Android Studio

Getting Started

This plugin requires Kotest 4.1.0 or above.

  val kotestVersion = "4.1.3" or "4.2.6"
  
  // and then the kotlin dependencies
  dependencies {
    ...
    testImplementation("io.kotest:kotest-assertions-core-jvm:$kotestVersion") // optional, for kotest assertions
    testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion") // required
  }
  
  tasks.withType<Test> { useJUnitPlatform() }

This plugin has been tested with IDEA 2020.3, 2020.2, 2020.1 and 2019.3.1.

Gutter Icons

The plugin provides gutter run icons for specs, top level tests, and nested tests.

gutter_icon_picture

Any tests disabled via a bang or by xfunctions such as xdescribe, will have a disabled test icon in the gutter.

gutter_icon_picture

Running Tests

If you execute a spec from the gutter icon, then all tests in that spec will be executed. If you execute a test, then that test and all nested tests will be executed.

gutter_icon_picture

Tool Window

The plugin provides a tool window view which displays the structure of your tests. The window describes the currently selected test file, which includes any specs defined in that file and tests contained inside those specs. The tree layout will mirror the structure of your tests for easy navigation.

test_explorer_tests

The tool window will include lifecycle callback methods (such as before / after test) if defined, as well as included test factories.

test_explorer_callbacks_picture

Clicking on a spec, test, include or callback will navigate directly to that element in the source editor.

Any tests that have been disabled using the bang prefix will have a different icon.

test_window_disabled_tests

You can execute (run/debug/run with coverage) a test or spec directly from this window. In addition, the window shows all test modules and allows you to run all tests in that module.

gutter_icon_picture

Modules, callbacks, and includes can be filtered out if you don't wish to see them. They are included by default.

Duplicated Test Highlighting

You cannot have two tests with the same name. The plugin will highlight any duplicated test names as errors.

duplicated_test_picture

Context Menu Run / Debug

Right clicking on a package will allow you to run, debug or run with coverage all the tests inside that package.

run_context_menu_picture

Intentions

This plugin has some basic intentions. For example, you can quickly mark a test as disabled.

gutter_icon_picture

Or you can highlight some text and mark it as should throw, or surround with a soft assertion block.

gutter_icon_picture

More Repositories

1

kotest

Powerful, elegant and flexible test framework for Kotlin with assertions, property testing and data driven tests.
Kotlin
4,398
star
2

kotest-extensions-arrow

Kotest extensions for Arrow
Kotlin
39
star
3

kotest-extensions-spring

Kotest extension for Spring framework
Kotlin
31
star
4

kotest-gradle-plugin

A gradle plugin for Kotest
Kotlin
30
star
5

kotest-examples-multiplatform

Kotlin
25
star
6

kotest-extensions-testcontainers

Kotest extensions for test containers
Kotlin
20
star
7

kotest-examples-spring-webflux

Example project using kotest and spring webflux
Kotlin
8
star
8

kotest-extensions-wiremock

Kotest extension to use wiremock through test lifecycles
Kotlin
7
star
9

kotest-extensions-embedded-kafka

A kotest extension that spins up embedded kafka instances
Kotlin
6
star
10

kotest-examples-quarkus

A sample app using kotest and quarkus
Kotlin
6
star
11

kotest-extensions-robolectric

Robolectric Kotest
Kotlin
6
star
12

kotest-android

Android extensions and matchers for Kotest
Kotlin
6
star
13

kotest-property-arbs

Fake data generator for use in tests (or in your applications) via Kotest arbs
Kotlin
6
star
14

kotest-assertions-ktor

Kotest assertions for Jetbrain's Ktor
Kotlin
5
star
15

kotest-extensions-httpstub

Extensions for kotest to stub external http services
Kotlin
5
star
16

kotest-extensions-allure

Kotest extensions for Allure Test Reporting
Kotlin
4
star
17

kotest-extensions-clock

A JVM based Clock implementation used for testing
Kotlin
4
star
18

kotest-assertions-konform

Kotest assertions for the konform library
Kotlin
4
star
19

kotest-android-samples

Kotlin
4
star
20

kotest-examples-javascript

A sample javascript project with kotest
Kotlin
3
star
21

kotest-assertions-kotlinx-datetime

Kotest assertions library for kotlinx date time
Kotlin
3
star
22

kotest-extensions-skippy

Kotest extension for using Skippy
Kotlin
3
star
23

kotest-extensions-pitest

Kotest extension for pitest
Kotlin
3
star
24

kotest-extensions-mockserver

Kotest extensions for MockServer
Kotlin
3
star
25

kotest-extensions-ktor-openapi

A ktor plugin for generating API docs based on executed tests
Kotlin
3
star
26

kotest-property-arrow

Property test extensions for Arrow
Kotlin
2
star
27

kotest-extensions-h2

Kotest extension for embedded SQL database with H2
Kotlin
2
star
28

kotest-power-assert

Testing out power assert with kotest
Kotlin
2
star
29

kotest-extensions-koin

Kotest extensions for Koin
Kotlin
2
star
30

kotest-assertions-klock

Kotest assertions for the klock library
Kotlin
2
star
31

kotest-property-datetime

Kotest property test arbs for kotlinx.datetime
Kotlin
1
star
32

kotest-examples-assertions

Shows examples of assertions including compiler plugin
1
star
33

kotest-assertions-json

Pimped out assertions for Kotest on Json data
1
star
34

kotest-extensions-gherkin

Validates upon execution that this spec matches the feature described via Gherkin
Kotlin
1
star
35

kotest-examples-native

Example project showing how to use Kotest assertions for native targets
Kotlin
1
star
36

kotest-examples-allure

Example project using Kotest and Allure https://github.com/allure-framework
Kotlin
1
star
37

kotest-assertions-jsoup

Kotest assertions for the JSoup library
Kotlin
1
star