glassfish
  1. glassfish
  2. GLASSFISH-20951

support a known xml test format for deployment devtests results

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: future release
    • Component/s: deployment
    • Labels:
      None

      Description

      Currently the deployment devtests generates a report format that is not known by Hudson.
      This create binary results (either passed or failed), making it difficult to track tests from Hudson.
      The idea is to have Hudson track the result and turn jobs to "UNSTABLE" when there are test failures.

      I scrubbed the various scripts and it seems that there are some tests written using JUnit, other using Testng, however I didn't find a way to generate a junit report for all the tests of the suite.
      It'd be nice to be able to have SQE xml reports (like ejb and admin devtests), or anything like testng/junit or javatest.

      Here is the current workaround I'm using

      # the test report is not a known by hudson (not junit, testng, javatest nor sqe format)
      # generating a dummy report to track test failures from hudson
      # TODO generate a classname that has some meaning, not just dummy.class.Name all the time
      
      # insert new lines where needed
      sed -e 's/<test /\'$'\n <test /g' \
          -e 's/<\/test>/\'$'\n <\/test>/g' \
          -e 's/<result /\'$'\n  <result /g' \
          appserv-tests/devtests/deployment/tests-results.xml > appserv-tests/devtests/deployment/tests-results-h.xml
      
      # dummy convertion
      sed -e s@'<tests>'@'<testsuites><testsuite>'@g \
          -e s@'</tests>'@'</testsuite></testsuites>'@g \
          -e s@'description=\".*\"'@@g \
          -e s@'<test '@'<testcase classname="dummy.class.Name" '@g \
          -e s@'</test>'@'</testcase>'@g \
          -e s@'<result status="PASSED".*\/>'@@g \
          -e s@'<result status="FAILED".*\/>'@'<failure type="testfailure"/>'@g \
          appserv-tests/devtests/deployment/tests-h.xml > appserv-tests/devtests/deployment/tests-results-junit.xml
      

        Activity

        Hide
        Romain Grécourt added a comment -

        update the script snippet I'm using currently

        Show
        Romain Grécourt added a comment - update the script snippet I'm using currently

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Romain Grécourt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: