I'm using 17.11.0, but I believe the test artifact publishing and custom
tabs features have been around long before v16.x.x.  I believe we used it
at a previous job in v10.x.x.

Creating the test artifact is simply telling GoCD which file or directory
structure is the location of that test artifact(s).  It could be just a
single XML file or an entire directory structure.  My test artifact is the
entire Maven surefire-reports folder:

[image: Inline image 1]


When I define my custom tab, I simply point it to the resulting index.html
file from the test artifact destination:

[image: Inline image 3]


Assuming you are already using JUnit today, I'd first look at ways to
either have JUnit produce HTML directly or see if there is a utility that
will convert the JUnit XML output to an HTML format. Or you can publish the
XML directly (it won't look as nice).   How that happens will be determined
if you use Ant, Maven, Gradle or some other project structure.  I believe
ANT and Maven surefire have built-in mechanisms to generate HTML from the
JUnit results, including TestNG.

Regardless, TestNG is just like JUnit in that you included the TestNG
dependency and annotate your test classes and methods accordingly with
@Test, etc.

Hopefully that was clear.

-Jeff

On Wed, Nov 1, 2017 at 2:23 PM, Christian Kolb <[email protected]>
wrote:

> Wow! That looks pretty great!
> What do I have to do in order to get such a TestNG Test Report?
> I think creating a test artifact is also needed for that?
>
> Which version of GoCD is needed for that? I use version 16.12.0 currently.
>
>
>
> Am Mittwoch, 1. November 2017 20:25:04 UTC+1 schrieb Jeff Vincent:
>>
>> Not sure if this is what you are looking for, but I use TestNG (similar
>> to JUnit) with Java.  It generates an HTML representation of the test
>> report that I publish as a Test artifact.  I then publish it as a tab in
>> the job.  Here is a partial screen grab:
>>
>> [image: Inline image 1]
>>
>> There may be a better way, but this is what I'm doing.
>>
>> -Jeff
>>
>>
>> On Wed, Nov 1, 2017 at 12:18 PM, Christian Kolb <[email protected]>
>> wrote:
>>
>>> Hello dear community!
>>>
>>> is there any way (probably through a Plugin) to visualize results of
>>> Java Unit tests and showing the code coverage in GoCD?
>>> For Jenkins for example there are some plugins which show you the
>>> results in nice graphs for each run/build and the overall results from the
>>> past runs.
>>> This one for example: https://wiki.jenkins.io/displa
>>> y/JENKINS/JUnit+Plugin
>>>
>>> Does anything comparable exist for GoCD? If not, any third-party tool
>>> that can help me out?
>>>
>>> Thanks in advance! :-)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "go-cd" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to