【发布时间】:2018-01-10 22:30:10
【问题描述】:
我使用 FunctionalTestCase 来测试 Mule ESB 3.5 应用程序。
为了测试,我有一个看起来像这样的类:
public class MyIntegrationTest extends FunctionalTestCase {
@Override
protected String getConfigFile()
{
return "app-config.xml";
}
@Test
public void test1() throws Exception{
}
@Test
public void test2() throws Exception{
}
...
}
我注意到每个@Test 方法都会重新创建应用程序上下文并且测试相当慢。
使用裸 Spring 框架,简单的集成测试会缓存应用程序上下文,因此测试会快得多。我想知道是否可以使用缓存的 Spring 应用程序上下文进行 Mule 应用程序集成测试?
【问题讨论】: