Symptoms
Certain testing frameworks, namely Groovy junit, Spock, and TestNG, have disappeared from the "Testing Library" section of the "Create Test" window. The issue was found to persist in later versions of IntelliJ IDEA Ultimate Edition, and the "Fix" button failed to add the chosen framework to the build.gradle.kts file.
-
Create a simple Hello-World project, like a "Console Application".
-
At the <caret> position, select Generate -> Test.
-
In the "Create Test" window:
1. Groovy Junit, Spock, and TestNG are unavailable in the "Testing Library" section.
2. The "Fix" button fails to add the chosen framework to build.gradle.kts.
Cause
The problem originates from the interference of a third-party plugin, the Spock Framework Enhancements. This plugin appears to be conflicting with the internal mechanisms in IntelliJ, causing these specific testing libraries to disappear from the "Create Test" window. It should be noted that the plugin in question has not been maintained for over 4 years, and therefore, compatibility issues may arise.
Resolution
The immediate workaround for this problem is disabling the third-party plugin "Spock Framework Enhancements". Once the plugin is disabled, the testing frameworks Groovy junit, Spock and TestNG should reappear in the "Testing Library" section for utilization.
To disable a plugin, follow these steps:
-
Go to File | Settings | Plugins for Windows and Linux or IntelliJ IDEA | Preferences | Plugins for macOS.
-
Find the plugin "Spock Framework Enhancements".
-
Uncheck the checkbox next to it.
-
Click Apply and OK.
-
Restart IntelliJ IDEA.
Then the issue will be fixed:
Ref: Groovy junit, Spock and TestNG disappeared from "Testing library" in "Create test" window
Comments
0 comments
Please sign in to leave a comment.