Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Jenkins output #5

Merged
merged 3 commits into from
May 20, 2015
Merged

Conversation

bobthemighty
Copy link
Collaborator

With this pull request we introduce a new reporter: XmlReporter.

Use it with run-contexts --xml-log=[PATH_TO_XML_FILE] to output JUnit style xml logs suitable for Jenkins test reporting.

This is still work in progress, I want to fix the formatting of tracebacks when displayed in HTML, for example, and I'm sure there's more data that we can add to make it prettier.

@benjamin-hodgson
Copy link
Owner

All looks good. Could you furnish me with an example of what the xml output looks like?

@bobthemighty
Copy link
Collaborator Author

I was working to this schema: https://svn.jenkins-ci.org/trunk/hudson/dtkit/dtkit-format/dtkit-junit-model/src/main/resources/com/thalesgroup/dtkit/junit/model/xsd/junit-4.xsd

<testsuites errors="0" failures="0" tests="43" time="0.23">
<testsuite errors="0" failures="0" name="When the host is not specified" tests="3" time="0.01">
<testcase name="it should have the correct port" time="0.00"/>
<testcase name="it should have the correct host" time="0.00"/>
<testcase name="it should contain three streams" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When reading a config file" tests="5" time="0.00">
<testcase name="it should have the correct stream id" time="0.00"/>
<testcase name="it should have the correct instance name" time="0.00"/>
<testcase name="it should contain three streams" time="0.00"/>
<testcase name="it should have the correct port" time="0.00"/>
<testcase name="it should have the correct host" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When the config specifies a redis counter" tests="1" time="0.00">
<testcase name="it should return a redis counter" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When the port is not specified" tests="2" time="0.00">
<testcase name="it should have the correct port" time="0.00"/>
<testcase name="it should contain three streams" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When the instance name is not specified" tests="1" time="0.00">
<testcase name="it should default to the hostname" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When redis contains a last read value for a stream" tests="1" time="0.00">
<testcase name="it should return the last read value" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When redis contains no information for a stream" tests="1" time="0.00">
<testcase name="it should return negative one" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When setting the last read value" tests="1" time="0.00">
<testcase name="it should be persisted in redis" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When the last read event is on the first page" tests="2" time="0.02">
<testcase name="we should raise the new events" time="0.00"/>
<testcase name="we should raise the events in the correct order" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When events are added after the first run" tests="2" time="0.01">
<testcase name="it should have read all the events" time="0.00"/>
<testcase name="it should have read the events in the correct order" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a client error occurs during fetch" tests="1" time="0.00">
<testcase name="it should log a warning" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When the last read event is not on the head page" tests="2" time="0.01">
<testcase name="we should raise the new events" time="0.00"/>
<testcase name="we should raise the events in the correct order" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a stream contains a single event" tests="5" time="0.00">
<testcase name="it should contain the stream id" time="0.00"/>
<testcase name="it should contain the body" time="0.00"/>
<testcase name="it should contain the event type" time="0.00"/>
<testcase name="it should contain the sequence number" time="0.00"/>
<testcase name="it should contain the event id" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a feed contains multiple events" tests="2" time="0.00">
<testcase name="the events should be ordered correctly" time="0.00"/>
<testcase name="it should return three events" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a feed spans several pages" tests="2" time="0.01">
<testcase name="we should raise all the events" time="0.00"/>
<testcase name="we should raise the events in the correct order" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When we receive a 50x range error" tests="1" time="0.00">
<testcase name="it should log a single warning" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a disconnection error occurs during fetch" tests="1" time="0.00">
<testcase name="it should log a warning" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a last read event is specified" tests="2" time="0.00">
<testcase name="it should return one event" time="0.00"/>
<testcase name="the events should be ordered correctly" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When multiple errors of the same type occur" tests="1" time="0.00">
<testcase name="it should log a warning" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a valueerror occurs during fetch" tests="1" time="0.00">
<testcase name="it should log a critical error" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When we receive a 40x range error" tests="1" time="0.00">
<testcase name="it should log an error" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When an event has bad json" tests="1" time="0.00">
<testcase name="it should log an error" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When the reader is invoked for a second time" tests="1" time="0.00">
<testcase name="it should not return any events" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When a message is rejected" tests="1" time="0.00">
<testcase name="it should log a warning" time="0.00"/>
</testsuite>
<testsuite errors="0" failures="0" name="When an event is processed" tests="2" time="0.00">
<testcase name="it should have recorded the event" time="0.00"/>
<testcase name="it should have sent the message" time="0.00"/>
</testsuite>
</testsuites>

@benjamin-hodgson
Copy link
Owner

Good stuff 😎 Is this ready to merge?

@bobthemighty
Copy link
Collaborator Author

It's working for us so far ;)
On 19 May 2015 1:31 pm, "Benjamin Hodgson" [email protected] wrote:

Good stuff [image: 😎] Is this ready to merge?


Reply to this email directly or view it on GitHub
#5 (comment)
.

benjamin-hodgson pushed a commit that referenced this pull request May 20, 2015
@benjamin-hodgson benjamin-hodgson merged commit ba562cf into benjamin-hodgson:master May 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants