cargo-maven2-plugin是被用来在容器上执行功能测试,当然你也可以在测试代码中直接使用cargo java api启动容器。
你可以通过cargo.servolet.port来设置容器的端口号:
<configuration>
<configuration>
<properties>
<cargo.servlet.port>8280</cargo.servlet.port>
</properties>
</configuration>
</configuration>
通过deployables来部署应用到容器中:
<configuration>
<deployables>
<deployable>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<type>war</type>
<pingURL>http://localhost:${server.port}/${context}</pingURL>
<properties>
<context>${context}</context>
</properties>
</deployable>
</deployables>
</configuration>
本文介绍如何使用cargo-maven2-plugin进行容器的功能测试,包括设置容器端口及部署应用的具体配置。
1601

被折叠的 条评论
为什么被折叠?



