<bdo id='fHSIv'></bdo><ul id='fHSIv'></ul>
<i id='fHSIv'><tr id='fHSIv'><dt id='fHSIv'><q id='fHSIv'><span id='fHSIv'><b id='fHSIv'><form id='fHSIv'><ins id='fHSIv'></ins><ul id='fHSIv'></ul><sub id='fHSIv'></sub></form><legend id='fHSIv'></legend><bdo id='fHSIv'><pre id='fHSIv'><center id='fHSIv'></center></pre></bdo></b><th id='fHSIv'></th></span></q></dt></tr></i><div id='fHSIv'><tfoot id='fHSIv'></tfoot><dl id='fHSIv'><fieldset id='fHSIv'></fieldset></dl></div>

<legend id='fHSIv'><style id='fHSIv'><dir id='fHSIv'><q id='fHSIv'></q></dir></style></legend>

  1. <tfoot id='fHSIv'></tfoot>
    1. <small id='fHSIv'></small><noframes id='fHSIv'>

      在 Maven 集成测试期间启动外部进程

      时间:2023-10-01
          <tbody id='ov0AV'></tbody>
        <tfoot id='ov0AV'></tfoot>
          <bdo id='ov0AV'></bdo><ul id='ov0AV'></ul>

            1. <legend id='ov0AV'><style id='ov0AV'><dir id='ov0AV'><q id='ov0AV'></q></dir></style></legend>
                <i id='ov0AV'><tr id='ov0AV'><dt id='ov0AV'><q id='ov0AV'><span id='ov0AV'><b id='ov0AV'><form id='ov0AV'><ins id='ov0AV'></ins><ul id='ov0AV'></ul><sub id='ov0AV'></sub></form><legend id='ov0AV'></legend><bdo id='ov0AV'><pre id='ov0AV'><center id='ov0AV'></center></pre></bdo></b><th id='ov0AV'></th></span></q></dt></tr></i><div id='ov0AV'><tfoot id='ov0AV'></tfoot><dl id='ov0AV'><fieldset id='ov0AV'></fieldset></dl></div>

              • <small id='ov0AV'></small><noframes id='ov0AV'>

                本文介绍了在 Maven 集成测试期间启动外部进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我想要对 Maven 项目进行完全自动化的集成测试.集成测试要求在运行之前启动一个外部(平台相关)程序.理想情况下,外部程序会在单元测试完成后被终止,但这不是必需的.

                I want completely automated integration testing for a Maven project. The integration tests require that an external (platform-dependent) program is started before running. Ideally, the external program would be killed after the unit tests are finished, but is not necessary.

                是否有一个 Maven 插件来完成这个?其他想法?

                Is there a Maven plugin to accomplish this? Other ideas?

                推荐答案

                你可以使用 antrun 插件.在里面你会使用 ant 的 exec 申请任务.

                You could use the antrun plugin. Inside you would use ant's exec apply task.

                类似的东西.

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.2</version>
                    <executions>
                      <execution>
                        <phase> <!-- a lifecycle phase --> </phase>
                        <configuration>
                
                          <tasks>
                            <apply os="unix" executable="cmd">
                              <arg value="/c"/>
                              <arg value="ant.bat"/>
                              <arg value="-p"/>
                            </apply>
                            <apply os="windows" executable="cmd.exe">
                              <arg value="/c"/>
                              <arg value="ant.bat"/>
                              <arg value="-p"/>
                            </apply>
                          </tasks>
                
                        </configuration>
                        <goals>
                          <goal>run</goal>
                        </goals>
                      </execution>
                    </executions>
                  </plugin>
                

                Ant 支持 os 特定命令当然是通过 条件任务.

                这篇关于在 Maven 集成测试期间启动外部进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:在 Spring Boot IntegrationTest 上禁用 @Schedule 下一篇:如何使用 Google UiAutomator 按两次按钮?

                相关文章

                最新文章

                <legend id='qy6QV'><style id='qy6QV'><dir id='qy6QV'><q id='qy6QV'></q></dir></style></legend>

                  <tfoot id='qy6QV'></tfoot>

                  1. <i id='qy6QV'><tr id='qy6QV'><dt id='qy6QV'><q id='qy6QV'><span id='qy6QV'><b id='qy6QV'><form id='qy6QV'><ins id='qy6QV'></ins><ul id='qy6QV'></ul><sub id='qy6QV'></sub></form><legend id='qy6QV'></legend><bdo id='qy6QV'><pre id='qy6QV'><center id='qy6QV'></center></pre></bdo></b><th id='qy6QV'></th></span></q></dt></tr></i><div id='qy6QV'><tfoot id='qy6QV'></tfoot><dl id='qy6QV'><fieldset id='qy6QV'></fieldset></dl></div>
                      <bdo id='qy6QV'></bdo><ul id='qy6QV'></ul>

                  2. <small id='qy6QV'></small><noframes id='qy6QV'>