Subject: [PATCH] Test repro --- Index: src/test/kotlin/org/jetbrains/plugins/template/MyItTest.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/test/kotlin/org/jetbrains/plugins/template/MyItTest.kt b/src/test/kotlin/org/jetbrains/plugins/template/MyItTest.kt new file mode 100644 --- /dev/null (date 1757105011287) +++ b/src/test/kotlin/org/jetbrains/plugins/template/MyItTest.kt (date 1757105011287) @@ -0,0 +1,25 @@ +package org.jetbrains.plugins.template + +import com.intellij.testFramework.TestDataPath +import com.intellij.testFramework.fixtures.BasePlatformTestCase +import git4idea.repo.GitRepositoryManager +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.Test + +@IntegrationTest +@TestDataPath("\$CONTENT_ROOT/src/test/testData") +class MyItTest : BasePlatformTestCase() { + + @BeforeEach + fun beforeEach() { + setUp() + } + + @Test + fun test() { + val service = GitRepositoryManager.getInstance(project) + assertNotNull(service) + } + + override fun getTestDataPath() = "src/test/testData/rename" +} \ No newline at end of file Index: gradle.properties IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>ISO-8859-1 =================================================================== diff --git a/gradle.properties b/gradle.properties --- a/gradle.properties (revision 02df6e806c9f79489a7808fe9ffb32b722401a62) +++ b/gradle.properties (date 1757104908057) @@ -17,7 +17,7 @@ # Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP platformPlugins = # Example: platformBundledPlugins = com.intellij.java -platformBundledPlugins = +platformBundledPlugins = Git4Idea # Example: platformBundledModules = intellij.spellchecker platformBundledModules = Index: gradle/libs.versions.toml IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml --- a/gradle/libs.versions.toml (revision 02df6e806c9f79489a7808fe9ffb32b722401a62) +++ b/gradle/libs.versions.toml (date 1757105318149) @@ -1,11 +1,12 @@ [versions] # libraries junit = "4.13.2" +junit5 = "5.13.4" opentest4j = "1.3.0" # plugins changelog = "2.4.0" -intelliJPlatform = "2.7.2" +intelliJPlatform = "2.9.0" kotlin = "2.2.0" kover = "0.9.1" qodana = "2025.1.1" @@ -13,6 +14,10 @@ [libraries] junit = { group = "junit", name = "junit", version.ref = "junit" } opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" } +junit5 = { module = "org.junit:junit-bom", version.ref = "junit5" } +jupiterEngine = { module = "org.junit.jupiter:junit-jupiter-engine" } +jupiterApi = { module = "org.junit.jupiter:junit-jupiter-api" } +jupiterPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher" } [plugins] changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } @@ -20,3 +25,7 @@ kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" } + +[bundles] +jupiterPlatform = [ "jupiterEngine", "jupiterPlatformLauncher" ] +jupiter = [ "jupiterApi" ] \ No newline at end of file Index: src/test/kotlin/org/jetbrains/plugins/template/IntegrationTest.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/test/kotlin/org/jetbrains/plugins/template/IntegrationTest.kt b/src/test/kotlin/org/jetbrains/plugins/template/IntegrationTest.kt new file mode 100644 --- /dev/null (date 1757104431681) +++ b/src/test/kotlin/org/jetbrains/plugins/template/IntegrationTest.kt (date 1757104431681) @@ -0,0 +1,8 @@ +package org.jetbrains.plugins.template + +import org.junit.jupiter.api.Tag + +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.RUNTIME) +@Tag("integration") +internal annotation class IntegrationTest Index: build.gradle.kts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/build.gradle.kts b/build.gradle.kts --- a/build.gradle.kts (revision 02df6e806c9f79489a7808fe9ffb32b722401a62) +++ b/build.gradle.kts (date 1757104449898) @@ -33,6 +33,10 @@ dependencies { testImplementation(libs.junit) testImplementation(libs.opentest4j) + testImplementation(platform(libs.junit5)) + testImplementation(libs.bundles.jupiter) + testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.13.4") + testRuntimeOnly(libs.bundles.jupiterPlatform) // IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html intellijPlatform { @@ -136,22 +140,14 @@ } } -intellijPlatformTesting { - runIde { - register("runIdeForUiTests") { - task { - jvmArgumentProviders += CommandLineArgumentProvider { - listOf( - "-Drobot-server.port=8082", - "-Dide.mac.message.dialogs.as.sheets=false", - "-Djb.privacy.policy.text=", - "-Djb.consents.confirmation.enabled=false", - ) - } - } - - plugins { - robotServerPlugin() +val integrationTag = "integration" +val integrationTests by intellijPlatformTesting.testIde.registering { + task { + useJUnitPlatform { + // exclude(testExcludes) + includeTags = setOf(integrationTag) + reports { + html.required = false } } }