TestNG support

If you have tests written with TestNG, you can easily annotate your tests to run with one of the listeners from tap4j, or specify a listener in your project pom.

TAP TestNG listeners

The TAP TestNG listeners are organized under the org.tap4j.ext.testng.listener package.

Listener Feature
TapListenerClass Outputs TAP per class
TapListenerClassYaml Outputs TAP per class with YAML
TapListenerMethod Outputs TAP per method
TapListenerMethodYaml Outputs TAP per method with YAML
TapListenerSuite Outputs TAP per suite
TapListenerSuiteYaml Outputs TAP per suite with YAML

TestNG suite xml

Add the following to your TestNG suite xml file in order to produce TAP Streams within your TestNG tests. Do not forget to add tap4j jar into your classpath during execution of the tests.

    <listener class-name="org.tap4j.ext.testng.listener.TapListenerSuite" />