Dear community,

Context: We are building a Maven extension to observe Maven builds as
distributed traces with OpenTelemetry (1)  and we would like to listen to
the execution of unit test.
*Question: is there a solution to inject a surefire RunListener
<https://maven.apache.org/surefire-archives/surefire-2.19.1/surefire-api/apidocs/org/apache/maven/surefire/report/RunListener.html>
from
a Maven extension?*

We have found APIs to inject a Junit RunListener
<https://junit.org/junit4/javadoc/4.12/org/junit/runner/notification/RunListener.html>
but
it's not solving our problem because
* it executes in a forked process
* it's only working for JUnit but not for TestNG and other testing
frameworks.

Thanks for all the great work on Maven,

Cyrille

(1) https://github.com/elastic/opentelemetry-maven-extension


-- 
Cyrille Le Clerc
Product Management Director, Observability
Paris, France

Reply via email to