It's all about the answers!

Ask a question

JBE & JUnit publisher


J.P. Pellet (51143) | asked Oct 06 '09, 11:33 a.m.
I'm using the JUnit publisher after an automated build with the Jazz Build Engine. I have 2 questions:

1. Can I somehow attach information (e.g., a log file) to a failed test? For now I only get a pretty uninformative stack trace for each failed test.

2. Can I enable JUnit publishing for an existing build definition that didn't use it before? For now the only solution I could find was to manually create another build definition and select JUnit Publishing upfront as post-build action, and then manually copy all build settings pane by pane. (BTW, this also seems to be the case for other pre- or post-build actions)

Cheers,
J.-P.

3 answers



permanent link
Martha (Ruby) Andrews (3.0k44351) | answered Oct 06 '09, 12:32 p.m.
JAZZ DEVELOPER
In answer to question #2, there is a triangle to the right of the words "Build Definition" in build definition editor. Click on the triangle to show a menu. Choose "Edit Configuration" and check JUnit Publishing on the Post-build tab.

Martha
Jazz Developer

I'm using the JUnit publisher after an automated build with the Jazz Build Engine. I have 2 questions:

1. Can I somehow attach information (e.g., a log file) to a failed test? For now I only get a pretty uninformative stack trace for each failed test.

2. Can I enable JUnit publishing for an existing build definition that didn't use it before? For now the only solution I could find was to manually create another build definition and select JUnit Publishing upfront as post-build action, and then manually copy all build settings pane by pane. (BTW, this also seems to be the case for other pre- or post-build actions)

Cheers,
J.-P.

permanent link
J.P. Pellet (51143) | answered Oct 07 '09, 4:45 a.m.
In answer to question #2, there is a triangle to the right of the words "Build Definition" in build definition editor. Click on the triangle to show a menu. Choose "Edit Configuration" and check JUnit Publishing on the Post-build tab.


Ah, indeed, thanks! That was pretty well hidden :-)

Now, does anyone know how to attach logs to the individual JUnit tests?

Best,
J.-P.

permanent link
Nick Edgar (6.5k711) | answered Oct 14 '09, 12:13 p.m.
JAZZ DEVELOPER
JUnit doesn't support attaching arbitrary log files (as far as I know), and if it did our JUnit log publishing support doesn't support that currently.

You could try using the logPublisher Ant task in the Build Toolkit, if you're able to write the logs to well-known files, or if you place them all in a particular directory, you could use Ant's file set tasks to iterate overall all of them.

For more details on the Ant tasks in the Build Toolkit, see:
https://jazz.net/wiki/bin/view/Main/BuildFAQ#BuildSystemToolkitContents

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.