如何从命令行传递多个suiteXML文件 [英] How to pass multiple suiteXML files from command line

查看:88
本文介绍了如何从命令行传递多个suiteXML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从命令行运行多个XML套件文件.

I am required to run multiple XML suite files from command line.

我的POM.xml-

<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.5</version>
    <configuration>
        <suiteXmlFiles>
                <suiteXmlFile>src/test/resources/xml_Suites/${tests}.xml</suiteXmlFile>
        </suiteXmlFiles>
        <testFailureIgnore>true</testFailureIgnore>
    </configuration>
</plugin>

从命令行尝试-

mvn clean -Dtests={abcd,xyz} test

只有xyz.xml被触发,而abcd.xml没有被触发.

Only xyz.xml is being triggered while abcd.xml is not being triggered.

基本上只触发括号中提到的最后一个xml文件.

Basically only the last xml file mentioned in the braces is being triggered.

以上语法有什么问题吗?

Is there anything wrong in the above syntax?

推荐答案

我认为您需要使用高级路径指定 更改-Dtests = src/test/resources/xml_Suites/abcd.xml,src/test/resources/xml_Suites/xyz.xml

I think you need to specify using enitre path Change -Dtests=src/test/resources/xml_Suites/abcd.xml,src/test/resources/xml_Suites/xyz.xml

这篇关于如何从命令行传递多个suiteXML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆