Maven JUnit和TestNG一起运行返回“;分叉的VM在没有恰当地说再见的情况下终止。VM崩溃或System.exit被调用;

Maven JUnit和TestNG一起运行返回“;分叉的VM在没有恰当地说再见的情况下终止。VM崩溃或System.exit被调用;,maven,selenium-webdriver,junit,automated-tests,testng,Maven,Selenium Webdriver,Junit,Automated Tests,Testng,尝试在Maven项目中同时运行JUnit测试和TestNG测试套件 当我运行“mvn clean install”或“mvn clean test”时,JUnit测试被正确执行,但是TestNG测试没有被启动并返回以下错误 Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properl

尝试在Maven项目中同时运行JUnit测试和TestNG测试套件

当我运行“mvn clean install”或“mvn clean test”时,JUnit测试被正确执行,但是TestNG测试没有被启动并返回以下错误

Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
POM.XML

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me</groupId>
<artifactId>po_the-internet-herokuapp</artifactId>
<version>0.0.1-SNAPSHOT</version>

<properties>
  <maven.compiler.source>1.7</maven.compiler.source>
  <maven.compiler.target>1.7</maven.compiler.target>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-java -->
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>1.2.5</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit -->
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-testng</artifactId>
        <version>1.2.5</version>
    </dependency>

        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
    </dependency>

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.6</version>
    </dependency>

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.0.0</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>4.7.2</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-testng</artifactId>
        <version>4.7.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit -->
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.2.5</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2</version>
    </dependency>
</dependencies>
<build>
     <plugins>
         <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <version>2.19.1</version>

             <configuration>
                <suiteXmlFiles>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                </suiteXmlFiles>
             </configuration>

             <dependencies>
                <!-- -->
                <dependency>
                    <groupId>org.apache.maven.surefire</groupId>
                    <artifactId>surefire-junit47</artifactId>
                    <version>2.19.1</version> 
                </dependency> 

                <dependency>
                    <groupId>org.apache.maven.surefire</groupId>
                    <artifactId>surefire-testng</artifactId>
                    <version>2.19.1</version>
                </dependency>
             </dependencies>
         </plugin>
     </plugins>
</build>

4.0.0
我
po_the-internet-herokuapp
0.0.1-快照
1.7
1.7
UTF-8
信息杯
黄瓜爪哇
1.2.5
信息杯
黄瓜试验
1.2.5
org.seleniumhq.selenium
硒爪哇
3.141.59
公地io
公地io
2.6
org.testng
testng
7.0.0
测试
黄瓜
黄瓜爪哇
4.7.2
测试
黄瓜
黄瓜试验
4.7.2
信息杯
黄瓜刺柏
1.2.5
测试
公地收藏
公地收藏
3.2
org.apache.maven.plugins
maven surefire插件
2.19.1
testng.xml
org.apache.maven.surefire
surefire-junit47
2.19.1 
org.apache.maven.surefire
surefire测试
2.19.1

另外,(不确定是否有帮助),我的TESTNG.XML非常简单

<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >

<suite name="SeleniumSuite">    
   <test name="testAll">
      <classes>
         <class name="Runner.runCucumber"/>
      </classes>
   </test>
</suite>


某些代码正在调用系统。退出。您的
Runner.runcumber
类中有什么?您还可以在
系统中放置断点。退出
并查看是谁调用它。