How can I set up testing environment for plugin depending on JavaScriptLang?
Hi,
I'm writing tests for the my plugin which depends on JavaScriptLang. I can run/debug on IDEA ultimate very well, but finding that may be I can't run tests code extedings `LightCodeInsightFixtureTestCase`, since the result shows: "java.lang.NoClassDefFoundError: org/apache/http/conn/ssl/SSLConnectionSocketFactory".
So I have to set up IDEA community and add JavaScriptLang.jar and CSS.jar to the class path of it. Am I right?
But after I have done it, there is another error appear, it says:
java.lang.RuntimeException: com/intellij/webcore/libraries/ScriptingLibraryManager
My test file is quite simple:
package com.netease.NEJ.core.define;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
/**
* Created by abnerzheng on 2017/2/23.
*/
public class DefinePathSettingTest extends LightCodeInsightFixtureTestCase{
public void testPathSetting() {
assertEquals("true", "true");
}
}
So could any one tell me how to fix it?
Please sign in to leave a comment.
Hi,
You should add lib/openapi.jar to the classpath. Alternatively, I may suggest to check gradle-intellij-plugin, as I know, it does it automatically.