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

DUnit support request

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: xunit-plugin
    • Labels:
    • Environment:
      windows xunit Jenkins plugin
    • Similar Issues:

      Description

      XUnit support alot of formats, it would be nice if it supported Delphi out of the box.

      An alternative, the formats of the generic unit test xml will be publish so easy adaptation will be possible.

        Attachments

          Activity

          Hide
          gbois Gregory Boissinot added a comment -

          Which kind of integration do you expect?

          Show
          gbois Gregory Boissinot added a comment - Which kind of integration do you expect?
          Hide
          nahumba nahumba nahumba added a comment - - edited

          I have no technical idea how to do the integration.

          As user expirience it would be nice to be able to run the dunit application after the main build.
          To let the dunit run, as it produce an xml file.
          parse that Xml file for success fail and exceptions. and return error for fail or exception, and success on successes.

          An Xml example, or even better the open-source code of dunit object "TXMLTestListener" from XMLTestRunner.pas could be provided.

          link: http://www.koders.com/delphi/fidEF3CCC691E55718B74B420D9C1150399D677B5D4.aspx?s=pos#L249

          xmlformat :

          main branch is
          <?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
          <TestRun>
          <TestSuite name="First">
          <TestSuite name="Second">
          <TestSuite name="Third">
          <Test name="TestCheck" result="PASS"></Test>
          <Test name="SecondTestCheck" result="PASS"></Test>
          <Statistics>
          <Stat name="Tests" result="2" />
          <Stat name="Failures" result="0" />
          <Stat name="Errors" result="0" />
          <Stat name="Success Rate" result="100%" />
          <Stat name="Finished At" result="12/09/2004 10:00:00" />
          <Stat name="Runtime" result="00:00:03" />
          </Statistics>
          </TestRun>

          3 functions for success error failure:

          procedure AddSuccess(test: ITest); virtual;
          procedure AddError(error: TTestFailure); virtual;
          procedure AddFailure(failure: TTestFailure); virtual;

          produce xml:

          success:
          '<Test name="'test.GetName'" result="PASS"></Test>

          error:
          '<Test name="'error.FailedTest.GetName'" result="ERROR">'
          '<FailureType>'error.ThrownExceptionName'</FailureType>'
          '<Location>'error.LocationInfo'</Location>'
          '<Message>'text2sgml(error.ThrownExceptionMessage)'</Message>'
          '</Test>'
          failure:

          '<Test name="'failure.FailedTest.GetName'" result="FAILS">'+
          '<FailureType>'failure.ThrownExceptionName'</FailureType>'+
          '<Location>'failure.LocationInfo'</Location>'+
          '<Message>'text2sgml(failure.ThrownExceptionMessage)'</Message>'+
          '</Test>'

          if you could provide the current interface for one of the xUnit testing i could create a new DUnit file and publish it under the license of the DUnit.

          as it seem to used here:
          http://stackoverflow.com/questions/4488203/dunit-test-result-messages-in-hudson

          Show
          nahumba nahumba nahumba added a comment - - edited I have no technical idea how to do the integration. As user expirience it would be nice to be able to run the dunit application after the main build. To let the dunit run, as it produce an xml file. parse that Xml file for success fail and exceptions. and return error for fail or exception, and success on successes. An Xml example, or even better the open-source code of dunit object "TXMLTestListener" from XMLTestRunner.pas could be provided. link: http://www.koders.com/delphi/fidEF3CCC691E55718B74B420D9C1150399D677B5D4.aspx?s=pos#L249 xmlformat : main branch is <?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?> <TestRun> <TestSuite name="First"> <TestSuite name="Second"> <TestSuite name="Third"> <Test name="TestCheck" result="PASS"></Test> <Test name="SecondTestCheck" result="PASS"></Test> <Statistics> <Stat name="Tests" result="2" /> <Stat name="Failures" result="0" /> <Stat name="Errors" result="0" /> <Stat name="Success Rate" result="100%" /> <Stat name="Finished At" result="12/09/2004 10:00:00" /> <Stat name="Runtime" result="00:00:03" /> </Statistics> </TestRun> 3 functions for success error failure: procedure AddSuccess(test: ITest); virtual; procedure AddError(error: TTestFailure); virtual; procedure AddFailure(failure: TTestFailure); virtual; produce xml: success: '<Test name="' test.GetName '" result="PASS"></Test> error: '<Test name="' error.FailedTest.GetName '" result="ERROR">' '<FailureType>' error.ThrownExceptionName '</FailureType>' '<Location>' error.LocationInfo '</Location>' '<Message>' text2sgml(error.ThrownExceptionMessage) '</Message>' '</Test>' failure: '<Test name="' failure.FailedTest.GetName '" result="FAILS">'+ '<FailureType>' failure.ThrownExceptionName '</FailureType>'+ '<Location>' failure.LocationInfo '</Location>'+ '<Message>' text2sgml(failure.ThrownExceptionMessage) '</Message>'+ '</Test>' if you could provide the current interface for one of the xUnit testing i could create a new DUnit file and publish it under the license of the DUnit. as it seem to used here: http://stackoverflow.com/questions/4488203/dunit-test-result-messages-in-hudson
          Hide
          gbois Gregory Boissinot added a comment -

          We have to write a custom XSL stylesheet to produce a JUnit report file.

          Show
          gbois Gregory Boissinot added a comment - We have to write a custom XSL stylesheet to produce a JUnit report file.

            People

            • Assignee:
              Unassigned
              Reporter:
              nahumba nahumba nahumba
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: