【发布时间】:2017-03-08 12:11:33
【问题描述】:
我可以使用 'ant alltests' 命令从 hybris 平台目录执行测试用例,但不能从 eclipse 执行。
从eclipse执行测试用例时出现以下错误->右键单击->运行为-> JUnit测试
INFO [main] (junit) [HybrisContextFactory] - Refreshing SpringContext (hybris Application context - junit) took: (29.48 s)
INFO [main] (junit) [HybrisContextFactory] Initializing application Spring ApplicationContext for tenant junit took: (31.27 s)
INFO [main] (junit) [DefaultRMIRegistryService] Unexporting the registry.
de.hybris.platform.core.UninstantiableCoreApplicationContextException: Error creating Spring application context.
at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.java:728)
at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:658)
at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:639)
at de.hybris.platform.core.Registry.activateTenant(Registry.java:700)
at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:544)
at de.hybris.platform.util.Utilities.setJUnitTenant(Utilities.java:1472)
at de.hybris.platform.testframework.runlistener.PlatformRunListener.testRunStarted(PlatformRunListener.java:44)
at de.hybris.platform.testframework.ChainingRunNotifierWrapper$1.notifyListener(ChainingRunNotifierWrapper.java:97)
at de.hybris.platform.testframework.ChainingRunNotifierWrapper$SafeNotifier.run(ChainingRunNotifierWrapper.java:239)
at de.hybris.platform.testframework.ChainingRunNotifierWrapper.fireTestRunStarted(ChainingRunNotifierWrapper.java:99)
at de.hybris.platform.testframework.HybrisJUnit4ClassRunner.run(HybrisJUnit4ClassRunner.java:124)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
【问题讨论】:
-
我在从 eclipse 执行测试时遇到了几个不同的问题,比如这个问题,最终使用了 hybris testweb 控制台,您可以从
your-ip:9001/test/访问该控制台。希望对您有所帮助。 -
无法从 testweb 控制台运行 Web 模块测试。
标签: eclipse spring ant integration-testing hybris