Problem using test fixtures - CORE_PLUGIN_ID not registered with IC
Hi all,
I'm developing using IC-90.96, and my tests no longer work. I'm using the following code to set up a test fixture:
myFixture = createFixture();
try
{
myFixture.setUp();
}
catch (Exception e)
{
throw new Error(e);
}
protected IdeaProjectTestFixture createFixture()
{
TestFixtureBuilder<IdeaProjectTestFixture> fixtureBuilder =
IdeaTestFixtureFactory.getFixtureFactory().createLightFixtureBuilder();
return fixtureBuilder.getFixture();
}
When I call setUp(), I get the following exception:
java.lang.AssertionError
at com.intellij.ide.plugins.PluginManager.initializePlugins(PluginManager.java:200)
at com.intellij.ide.plugins.PluginManager.getPlugins(PluginManager.java:103)
at com.intellij.openapi.application.impl.ApplicationImpl.loadApplicationComponents(ApplicationImpl.java:296)
at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:191)
at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:35)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:57)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:51)
at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:33)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:56)
at com.intellij.testFramework.LightPlatformTestCase.initApplication(LightPlatformTestCase.java:136)
at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:47)
at org.jetbrains.plugins.scheme.parser.ParserTestBase.setUp(ParserTestBase.java:35)
It seems to be assuming that a plugin with ID CORE_PLUGIN_ID is registered. Any ideas what I could do to fix this?
Thanks,
Colin
请先登录再写评论。
Hello Colin,
For the time being, you need to add -Didea.platform.prefix=Idea when you're
running your tests against an IC build of IDEA. In the future that option
will be set automatically.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitry,
Ok, thanks. I'll try that this evening and see how I go.
Cheers,
Colin