mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 10:17:50 +08:00
IntelliJ Platform Gradle Plugin: test framework
This commit is contained in:
parent
0fe27af6e2
commit
19b5fe7025
@ -42,6 +42,8 @@ dependencies {
|
||||
|
||||
pluginVerifier()
|
||||
zipSigner()
|
||||
|
||||
testFramework(TestFrameworkType.JUnit4)
|
||||
}
|
||||
|
||||
// other dependencies, e.g., 3rd-party libraries
|
||||
@ -108,6 +110,17 @@ See also:
|
||||
## Testing
|
||||
|
||||
To implement tests for IntelliJ Platform plugin, it is necessary to explicitly add a dependency on the `test-framework` library containing IntelliJ Platform test classes.
|
||||
In the most cases, the `JUnit4` package will be needed:
|
||||
|
||||
```kotlin
|
||||
import org.jetbrains.intellij.platform.gradle.extensions.TestFrameworkType
|
||||
|
||||
dependencies {
|
||||
intellijPlatform {
|
||||
testFramework(TestFrameworkType.JUnit4)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The provided `testFramework(type, version)` helper method makes it possible to add the base artifact to the test classpath or its variants, such as Java, Go, ReSharper, etc.
|
||||
|
||||
|
@ -173,13 +173,11 @@ Allows for adding `test-framework` testing library variants. See [Dependencies E
|
||||
|
||||
| Name | Coordinates |
|
||||
|--------------|---------------------------------------------------------------|
|
||||
| `Common` | `com.jetbrains.intellij.platform:test-framework-common` |
|
||||
| `Core` | `com.jetbrains.intellij.platform:test-framework-core` |
|
||||
| `Default` | `com.jetbrains.intellij.platform:test-framework` |
|
||||
| `Go` | `com.jetbrains.intellij.go:go-test-framework` |
|
||||
| `Ruby` | `com.jetbrains.intellij.idea:ruby-test-framework` |
|
||||
| `Java` | `com.jetbrains.intellij.java:java-test-framework` |
|
||||
| `JavaScript` | `com.jetbrains.intellij.javascript:javascript-test-framework` |
|
||||
| `JUnit4` | `com.jetbrains.intellij.platform:test-framework` |
|
||||
| `JUnit5` | `com.jetbrains.intellij.platform:test-framework-junit5` |
|
||||
| `Maven` | `com.jetbrains.intellij.maven:maven-test-framework` |
|
||||
| `ReSharper` | `com.jetbrains.intellij.resharper:resharper-test-framework` |
|
||||
|
Loading…
x
Reference in New Issue
Block a user