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:
When I define my custom tab, I simply point it to the resulting index.html file from the test artifact destination:
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