【问题标题】:How should I structure my GWT integration tests when using Maven?使用 Maven 时,我应该如何构建我的 GWT 集成测试?
【发布时间】:2011-01-10 21:06:33
【问题描述】:
我正在使用 Maven 构建 GWT 应用程序。我们在 Maven 中使用带有多个子模块的父模块。我们决定为集成测试制作一个单独的模块,因为将集成测试与同一模块中的单元测试分开似乎很麻烦。但是,当我们尝试从单独的 maven 模块运行 GwtTestCase 测试时,它被证明是有问题的;具体来说,我们找不到一种简单的方法来让测试在 Eclipse 或 Maven 中查看我们的应用程序的入口点。
在使用 Maven 时,是否有一种构建 GWT 集成测试的好方法?将它们留在 GUI 模块中并尝试使用 maven 配置文件将集成测试与单元测试分开是最佳选择吗?
【问题讨论】:
标签:
gwt
maven
integration-testing
【解决方案1】:
我们不会将集成测试提取到单独的模块中
在我们的项目中,我们是这样设计的:
<profiles>
<profile>
<id>nointegration</id>
<properties>
<integration.tests.includes>none</integration.tests.includes>
</properties>
</profile>
...
</profiles>
当我们不想运行集成测试时:
mvn clean install -Pnointegration
所以只运行了通常的非集成测试