<legend id='7eAqi'><style id='7eAqi'><dir id='7eAqi'><q id='7eAqi'></q></dir></style></legend><tfoot id='7eAqi'></tfoot>

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

        <small id='7eAqi'></small><noframes id='7eAqi'>

          <bdo id='7eAqi'></bdo><ul id='7eAqi'></ul>

        maven pom.xml 如何识别非标准项目结构中的 testng 测试用例?

        How maven pom.xml identifies the testng test cases in a non-standard project structure?(maven pom.xml 如何识别非标准项目结构中的 testng 测试用例?)

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

                  <small id='nXx0z'></small><noframes id='nXx0z'>

                  本文介绍了maven pom.xml 如何识别非标准项目结构中的 testng 测试用例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我对 maven 和 testng 完全陌生.我使用 maven 作为构建工具,并使用 testng 作为我的测试框架.我没有遵循标准的 Maven 项目结构.现在我希望我的 pom.xml 在我的项目中执行测试用例.问题是,pom.xml 如何知道要考虑执行哪些测试用例?

                  解决方案

                  如果你把它放在一个地方,你需要设置 maven-surefire-plugin 配置的 testClassesDirectory 参数:

                  <代码><项目>[...]<构建><插件><插件><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><版本>2.17</版本><配置><testClassesDirectory>路径/到/编译的测试类</testClassesDirectory></配置></插件></插件></构建>[...]</项目>

                  所有这些都在 Maven Surefire 插件文档中详细记录了p>

                  I am completely new to maven and testng. I am using maven as build tool, and testng as my testing framework. I am not following the standard maven project structure. Now I want my pom.xml to execute the test cases in my project. The question is, how pom.xml knows what are the test cases to consider for execution?

                  解决方案

                  If you keep this in a single place you need to set the testClassesDirectory argument of the maven-surefire-plugin configuration:

                  <project>
                    [...]
                    <build>
                      <plugins>
                        <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-surefire-plugin</artifactId>
                          <version>2.17</version>
                          <configuration>
                            <testClassesDirectory>path/to/compiled test classes</testClassesDirectory>
                          </configuration>
                        </plugin>
                      </plugins>
                    </build>
                    [...]
                  </project>
                  

                  All of this is well documented in the Maven Surefire Plugin Documentation

                  这篇关于maven pom.xml 如何识别非标准项目结构中的 testng 测试用例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                      <legend id='rSxy4'><style id='rSxy4'><dir id='rSxy4'><q id='rSxy4'></q></dir></style></legend>
                        <bdo id='rSxy4'></bdo><ul id='rSxy4'></ul>

                        <small id='rSxy4'></small><noframes id='rSxy4'>

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

                          <tbody id='rSxy4'></tbody>
                        <tfoot id='rSxy4'></tfoot>