Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1948

Error in forked process displayed due to dependsonmethod when testng.xml is run with maven-surefire

    XMLWordPrintableJSON

Details

    • Important

    Description

      I am getting "Error in Forked Process" with cause saying that one of the @test is depending on a method and the Method is not annotated with @test.

      My testng.xml does not have the mentioned @test class at all and I am not sure why this @test is being picked up in first place.

      My POM.XML
       {{ <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>3.0.0-M5</version>

      <executions>
      <execution>
      <configuration>

      <skip>false</skip>
      <forkCount>2</forkCount>
      <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
      <maven.test.failure.ignore>false</maven.test.failure.ignore>
      <rerunFailingTestsCount>2</rerunFailingTestsCount>
      <suiteXmlFiles>
      <suiteXmlFile>testng.xml</suiteXmlFile>
      </suiteXmlFiles>
      </configuration>
      </execution>
      </executions>
      </plugin>}}
      Junit & testNG versions :
       {{<dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
      </dependency>

      <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.9.8</version>
      </dependency>}}
      TestnG :
       {{<suite name="StoresCentral_TestSuite_Param" configfailurepolicy="continue" verbose="10"
      threadcount="1" parallel="none"><test name="POC_tests_0"><classes><class
      name="au.wow.ngbomain.tests.PracticeArtLookupTest"></class></classes></test></suite>}}
      Error :

      [ERROR] Please refer to C:\Automation\ForkErrorCheck\s\Test\target\surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] There was an error in the forked process [ERROR] [ERROR] au.wow.ngbomain.tests.AdjustmentLogReportTests.pageValidation() is depending on method public void au.wow.ngbomain.tests.Sample.check() throws java.lang.Exception, which is not annotated with @Test or not included. [ERROR] org.testng.TestNGException:

      Attachments

        Activity

          People

            Unassigned Unassigned
            harish Swaminathan Harish
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: