簡體   English   中英

使用spring-boot在teamcity中運行集成測試並放心

[英]running integration tests in teamcity using spring-boot and restassured

我正在使用springboot和rest-assured編寫集成測試,並使用SpringApplicationConfiguration加載配置。

這是測試類注釋的外觀:

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = RestAPIApplication.class)
@IntegrationTest("server.port:8083") // this is the port set by my application 

現在是我真正的問題。 當我使用maven在teamcity中運行測試類時,是否不必在運行集成測試之前配置一些東西來運行springboot服務器?

我是springboot的新手,所以也許這個問題是新手,但請為我指出正確的路徑。

如果您使用的是嵌入式tomcat,則無需進行其他設置-只需運行maven測試即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM