2015-11-01 38 views
5

在Spring(Boot)中,@IntegrationTest@WebIntegrationTest有什麼區別?@IntegrationTest vs @WebIntegrationTest註釋

根據文檔,兩個註釋都提供了一個在正常端口上偵聽的完全加載的應用程序服務器。

+2

嗯,我想文件非常明確:'@ IntegrationTest':*如果您的測試還使用@WebAppConfiguration考慮使用WebIntegrationTest而不是*,'@ WebIntegrationTest':*此註釋可以用作@IntegrationTest和@ WebAppConfiguration *的替代方法。從這我會認爲'@ IntegrationTest'與'@ WebAppConfiguration'和'@ WebIntegrationTest'是一樣的。 –

+0

謝謝@BohuslavBurghardt,我一定錯過了。 –

回答

8

@WebIntegrationTest = @IntegrationTest + @WebAppConfiguration