@@ -131,6 +131,21 @@ tasks.processJupyterApiResources {
131
131
}
132
132
```
133
133
134
+ ### Integration testing for the integration logic
135
+ You may want to automatically check if your library integrates correctly into kernel. To achieve this, inherit your
136
+ test class from ` org.jetbrains.kotlinx.jupyter.testkit.JupyterReplTestCase ` and use its methods to execute cells.
137
+ Your library integration descriptors should be already on classpath and will be loaded automatically by the test logic,
138
+ you don't need to use ` %use ` magic or ` DependsOn ` annotation to switch on your library. But you may use magics and
139
+ annotations for other purposes, as usual.
140
+
141
+ The artifact containing test templates is included automatically into ` testImplementation ` configuration if you
142
+ use the Gradle plugin. You may turn this behavior off by setting ` kotlin.jupyter.add.testkit ` Gradle property
143
+ to ` false ` . If you want to include this artifact into your build manually, you'll find the instructions
144
+ [ here] [ maven-search-testkit ] .
145
+
146
+ For the examples of integration testing see ` org.jetbrains.kotlinx.jupyter.testkit.test.JupyterReplTestingTest ` in
147
+ this repository or [ related tests in DataFrame] [ dataframe-integration-tests ] .
148
+
134
149
### Integration using other build systems
135
150
136
151
If you don't use Gradle as a build system, there is an alternative way.
@@ -156,4 +171,6 @@ resources. This file should contain FQNs of all integration classes in the JSON
156
171
Classes derived from ` LibraryDefinition ` should be added to the ` definitions ` array.
157
172
Classes derived from ` LibraryDefinitionProducer ` should be added to the ` producers ` array.
158
173
159
- [ libs-repo ] : https://github.com/Kotlin/kotlin-jupyter-libraries
174
+ [ libs-repo ] : https://github.com/Kotlin/kotlin-jupyter-libraries
175
+ [ dataframe-integration-tests ] : https://github.com/Kotlin/dataframe/tree/master/src/test/kotlin/org/jetbrains/dataframe/jupyter
176
+ [ maven-search-testkit ] : https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlin-jupyter-test-kit
0 commit comments