Contains SPI of test module.
Interfaces | |
ArgumentListProvider | shared 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 | shared ArgumentListResolver Represents a strategy how to resolve argument lists for parameterized test.
Its responsibility is discover annotation, which satisfy |
ArgumentProvider | shared 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 | shared 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 | shared 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 | shared TestExtension Represents a marker interface for all test extensions. |
TestExtensionResolver | shared TestExtensionResolver Represents a strategy how to resolve test extension. |
TestInstancePostProcessor | shared TestInstancePostProcessor Represents a strategy for post-processing test instances. |
TestInstanceProvider | shared TestInstanceProvider Represents a strategy for creating new instance of test class. |
TestVariantProvider | shared TestVariantProvider Represents a strategy that can resolve test variant description by provided arguments,
see |
Classes | |
ArgumentProviderContext | shared ArgumentProviderContext Represents a context given to |
TestExecutionContext | shared TestExecutionContext Represents a context in which a test is executed, it's used by |