Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1462

Read TestNG suite- and test-names

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • junit-plugin
    • None
    • Platform: All, OS: All

      using 1.200 of hudson, and testng-5.7. in maven-builds, which an explicitely
      listed testng.xml file as configuration settings of the surefire-plugin. (see
      sample code below)

      Test results are correctly read and displayed - fine.
      However, the Test-suite-name, test-names and test-class-names are NOT
      parsed/used, instead "(root)->TestSuite" is used and all testMethods are placed
      below this one entry.

      Side note: pls also check, whether the collection of more than one result works
      correctly (like: 2 child poms, each has a testng.xml)

      Thanks.

      sample pom.xml:
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <suiteXmlFiles>
      <suiteXmlFile>
      testng.xml
      </suiteXmlFile>
      </suiteXmlFiles>
      </configuration>

      sample testng.xml:
      <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

      <suite name="NSWG UserManagement Core Tests" verbose="2">
      <test name="Entity CRUD">
      <packages>
      <package name="com.cg.nswg.user.domain" />
      </packages>
      </test>
      </suite>

      sample output:
      <testng-results>
      <reporter-output>
      </reporter-output>
      <suite name="NSWG UserManagement Core Tests">
      <groups>
      </groups>
      <test name="Entity CRUD">
      <class name="com.cg.nswg.user.domain.DummyTest">
      <test-method status="PASS" signature="test1()" name="test1"
      duration-ms="0" started-at="2008-03-25T12:13:44Z"
      finished-at="2008-03-25T12:13:44Z">
      </test-method>
      </class>
      </test>
      </suite>
      </testng-results>

        1. hudson.JPG
          hudson.JPG
          124 kB
        2. hudson1462_1.zip
          67 kB
        3. hudson1462.zip
          63 kB

            Unassigned Unassigned
            gerhard6 gerhard6
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: