Code Monkey home page Code Monkey logo

kotest-intellij-plugin's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.