Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml TestNG测试不会等到以前的完成_Xml_Maven_Testng - Fatal编程技术网

Xml TestNG测试不会等到以前的完成

Xml TestNG测试不会等到以前的完成,xml,maven,testng,Xml,Maven,Testng,我对测试有问题,我希望随后运行它们,但其中一些测试在另一个测试完成之前启动。我怎样才能防止呢 我的配置: pom.xml <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <suiteXmlFiles> <suiteXmlFile&g

我对测试有问题,我希望随后运行它们,但其中一些测试在另一个测试完成之前启动。我怎样才能防止呢

我的配置:

pom.xml

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
    <suiteXmlFiles>
        <suiteXmlFile>src/test/resources/testng-install.xml</suiteXmlFile>
        <suiteXmlFile>src/test/resources/testng-config.xml</suiteXmlFile>
        <suiteXmlFile>src/test/resources/testng-tests.xml</suiteXmlFile>
    </suiteXmlFiles>
    <systemPropertyVariables>
        <basedir>${project.basedir}</basedir>
    </systemPropertyVariables>
</configuration>
<suite name="install" verbose="10" parallel="false">

<test name="install" parallel="false">
    <classes>
        <class name="com.ac.web.it.install.server.InstallEnvironmentTest" />
        <class name="com.ac.web.it.install.backend.InstallBackendTest" />
    </classes>
</test>
<suite name="config" verbose="10" parallel="false">

<test name="config" parallel="false">
    <classes>
        <class name="com.ac.web.it.install.config.ConfigTest" />
    </classes>
</test>
org.apache.maven.plugins
maven surefire插件
src/test/resources/testng-install.xml
src/test/resources/testng-config.xml
src/test/resources/testng-tests.xml
${project.basedir}
testng install.xml

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
    <suiteXmlFiles>
        <suiteXmlFile>src/test/resources/testng-install.xml</suiteXmlFile>
        <suiteXmlFile>src/test/resources/testng-config.xml</suiteXmlFile>
        <suiteXmlFile>src/test/resources/testng-tests.xml</suiteXmlFile>
    </suiteXmlFiles>
    <systemPropertyVariables>
        <basedir>${project.basedir}</basedir>
    </systemPropertyVariables>
</configuration>
<suite name="install" verbose="10" parallel="false">

<test name="install" parallel="false">
    <classes>
        <class name="com.ac.web.it.install.server.InstallEnvironmentTest" />
        <class name="com.ac.web.it.install.backend.InstallBackendTest" />
    </classes>
</test>
<suite name="config" verbose="10" parallel="false">

<test name="config" parallel="false">
    <classes>
        <class name="com.ac.web.it.install.config.ConfigTest" />
    </classes>
</test>

testng config.xml

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
    <suiteXmlFiles>
        <suiteXmlFile>src/test/resources/testng-install.xml</suiteXmlFile>
        <suiteXmlFile>src/test/resources/testng-config.xml</suiteXmlFile>
        <suiteXmlFile>src/test/resources/testng-tests.xml</suiteXmlFile>
    </suiteXmlFiles>
    <systemPropertyVariables>
        <basedir>${project.basedir}</basedir>
    </systemPropertyVariables>
</configuration>
<suite name="install" verbose="10" parallel="false">

<test name="install" parallel="false">
    <classes>
        <class name="com.ac.web.it.install.server.InstallEnvironmentTest" />
        <class name="com.ac.web.it.install.backend.InstallBackendTest" />
    </classes>
</test>
<suite name="config" verbose="10" parallel="false">

<test name="config" parallel="false">
    <classes>
        <class name="com.ac.web.it.install.config.ConfigTest" />
    </classes>
</test>

我想在
testng安装
中完成所有测试,然后在
testng配置
中启动测试