【发布时间】:2021-05-19 10:56:12
【问题描述】:
我正在开发一个有 2 个模块的应用程序。
- 服务器模块,即 SpringBoot。
- Angular中的ui
我无法为我的应用程序运行任何 E2E 测试,因为它在测试运行之前没有启动。我在测试类中定义了下面应该调出应用程序上下文的定义,但似乎没有。
@ContextConfiguration(classes=Application.class, loader = SpringBootContextLoader.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
当我使用 IDE 中的运行按钮正常启动应用程序时,应用程序确实可以正常启动并在 localhost:8080 上正常运行。我不确定为什么在我尝试运行测试时应用程序没有出现。
是因为模块不同吗?
【问题讨论】:
标签: angularjs spring-boot cucumber bdd