Contains SPI of test module.
Interfaces | |
ArgumentListProvider | Source Codeshared ArgumentListProvider Represents a contract for annotations, which serves as argument lists provider for parametrized tests.
These annotations are used on function and are resolved during execution. Basic implementation is
annotation Example: shared annotation DataFileAnnotation dataFile(String fileName) => DataFileAnnotation(fileName); shared final annotation class DataFileAnnotation(String fileName) satisfies OptionalAnnotation<DataFileAnnotation,FunctionDeclaration> & ArgumentListProvider { shared actual {Anything[]*} argumentLists(ArgumentProviderContext context) => CsvFileParser(fileName).parse(); } test dataFile("people.csv") shared void shouldProcessPerson(String firstname, String surname, Integer age) { ... } |
ArgumentListResolver | Source Codeshared ArgumentListResolver Represents a strategy how to resolve argument lists for parameterized test.
Its responsibility is discover annotation, which satisfy |
ArgumentProvider | Source Codeshared ArgumentProvider Represents a contract for annotations, which serves as arguments provider for parametrized tests.
These annotations are used on parameters and are resolved during execution of parameterized tests.
Basic implementation is annotation Example ( shared annotation RandomAnnotation random() => RandomAnnotation(); shared final annotation class RandomAnnotation() satisfies OptionalAnnotation<RandomAnnotation,FunctionOrValueDeclaration> & ArgumentProvider { shared actual {Anything*} arguments(ArgumentProviderContext context) => randomGenerator.nextInteger(); } test shared void shouldGuessNumber(random Integer num) { assert(magician.guessNumber() == num); } |
TestCondition | Source Codeshared TestCondition Represents a contract for annotation, which serves as condition, that has to be
fullfiled to execute test, in other case the test execution is The example below shows shared annotation BugAnnotation bug(String id) => BugAnnotation(id); shared final annotation class BugAnnotation(String id) satisfies OptionalAnnotation<BugAnnotation,FunctionDeclaration> & TestCondition { shared actual Result evaluate(TestDescription description) { // check if the issue is already resolved } } test bug("1205") shared void shouldTestSomethingButThereIsBug() { } |
TestExecutor | Source Codeshared TestExecutor Represent a strategy how to run test.
During test execution notifies test mechanism about significant events via given Custom implementation can be specify via
|
TestExtension | Source Codeshared TestExtension Represents a marker interface for all test extensions. |
TestExtensionResolver | Source Codeshared TestExtensionResolver Represents a strategy how to resolve test extension. |
TestInstancePostProcessor | Source Codeshared TestInstancePostProcessor Represents a strategy for post-processing test instances. |
TestInstanceProvider | Source Codeshared TestInstanceProvider Represents a strategy for creating new instance of test class. |
TestVariantProvider | Source Codeshared TestVariantProvider Represents a strategy that can resolve test variant description by provided arguments,
see |
Classes | |
ArgumentProviderContext | Source Codeshared ArgumentProviderContext Represents a context given to |
TestExecutionContext | Source Codeshared TestExecutionContext Represents a context in which a test is executed, it's used by |