nahumba nahumba edited a comment on Improvement JENKINS-15137

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

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to