为什么maven surefire插件没有';是否按优先级顺序运行testng.xml文件?

为什么maven surefire插件没有';是否按优先级顺序运行testng.xml文件?,testng,maven-surefire-plugin,Testng,Maven Surefire Plugin,我的pom.xml文件没有按优先级顺序运行测试脚本。我已经提到了priority=0、1等类的优先级。但它会从包中随机选取类。它应该按照优先级顺序运行。它可以通过testng.xml触发器正常工作 <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifac

我的pom.xml文件没有按优先级顺序运行测试脚本。我已经提到了priority=0、1等类的优先级。但它会从包中随机选取类。它应该按照优先级顺序运行。它可以通过testng.xml触发器正常工作

<build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
               <source>1.8</source>
               <target>1.8</target>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
         </plugin>
      </plugins>
   </build>

org.apache.maven.plugins
maven编译器插件
1.8
1.8
org.apache.maven.plugins
maven surefire插件
2.19.1
${suiteXmlFile}

原因可能是什么?

这是因为执行环境设置为JRE而不是JDK。 因此,将工作区默认值从JRE更改为JDK解决了这个问题。 对于JRE HOME,我给出了C:\Program Files\Java\jdk1.8.0_171


因为使用JDK进行编译是必须的。

您能以列出的优先级顺序显示您的测试文件吗?