如何从java文件中的pom.xml获取动态的suiteXmlFile名称

时间:2017-04-12 04:21:31

标签: maven pom.xml

我的pom.xml读作: -

<property>
                            <name>haltonfailure</name>
                            <value>false</value>
                        </property>
                        <property>
                            <name>delegateCommandSystemProperties</name>
                            <value>true</value>
                        </property>
                    </properties>
                    <reportsDirectory>test-output\${buildTag}</reportsDirectory>
                    <suiteXmlFiles>
                        <suiteXmlFile>${inputXML}</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
        </plugins>

所有动态参数都是使用Jenkins传递的。但是如何在我的testbase类中读取动态inputXML名称,以便我可以在此xml文件的基础上应用某些条件?每当我尝试读取此文件时,我总是得到$ {inputXML},但我需要从Jenkins传递的值。

请在这里帮忙。

0 个答案:

没有答案