0% found this document useful (0 votes)
32 views2 pages

Kotlin - Test: Annotations Utility Functions

The kotlin.test library provides annotations to mark test functions and utility functions for assertions that work across test frameworks. It consists of common modules for assertions and annotations, JVM and JS implementations, and modules that provide implementations of asserters for JUnit, JUnit 5, and TestNG and map the annotations to those frameworks.

Uploaded by

Đinh Gia Lưu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Kotlin - Test: Annotations Utility Functions

The kotlin.test library provides annotations to mark test functions and utility functions for assertions that work across test frameworks. It consists of common modules for assertions and annotations, JVM and JS implementations, and modules that provide implementations of asserters for JUnit, JUnit 5, and TestNG and map the annotations to those frameworks.

Uploaded by

Đinh Gia Lưu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

kotlin.

test
The kotlin.test library provides annotations to mark test functions and a set of utility
functions for performing assertions in tests, independently of the test framework being
used.

The test framework is abstracted through the Asserter class. A


basic Asserter implementation is provided out of the box. Note that the class is not
intended to be used directly from tests, use instead the top-level assertion functions which
delegate to the Asserter.

The library consists of the modules:

 kotlin-test-common – assertions for use in common code;

 kotlin-test-annotations-common – test annotations for use in common code;

 kotlin-test – a JVM implementation of assertions from kotlin-test-common;

 kotlin-test-junit – provides an implementation of Asserter on top of JUnit


and maps the test annotations from kotlin-test-annotations-common to JUnit
test annotations;

 kotlin-test-junit5 – provides an implementation of Asserter on top of JUnit 5


and maps the test annotations from kotlin-test-annotations-common to JUnit
5 test annotations;

 kotlin-test-testng – provides an implementation of Asserter on top of


TestNG and maps the test annotations from kotlin-test-annotations-
common to TestNG test annotations;

 kotlin-test-js – a JS implementation of common test assertions and


annotations with the out-of-the-box support for Jasmine, Mocha, and Jest testing
frameworks, and an experimental way to plug in a custom unit testing
framework.

Packages
C
ommon
J
VM
J
Unit
J
Unit5
T
estNG
J
S
N
ative
1.0

kotlin.test
Annotations to mark test functions and top-level functions for performing assertions in tests.
J
Unit
1.0

kotlin.test.junit
J
Unit5
1.0

kotlin.test.junit5
T
estNG
1.0

kotlin.test.testng

Index

You might also like