1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.maven.surefire.api.report; 20 21 import org.apache.maven.plugin.surefire.log.api.ConsoleLogger; 22 23 /** 24 * This architecture has two sides (forked JVM, plugin JVM) implementing the same interface {@link TestReportListener}: 25 * <pre> 26 * 1. <b>publisher</b> - surefire fork JVM: {@link org.apache.maven.surefire.api.booter.ForkingRunListener} 27 * registered in {@link org.apache.maven.surefire.api.provider.SurefireProvider} 28 * 2. <b>consumer</b> - plugin JVM: {@code TestSetRunListener} registered in the {@code ForkClient} 29 * </pre> 30 * Both implementations of {@link TestReportListener}, i.e. 31 * {@link org.apache.maven.surefire.api.booter.ForkingRunListener} and {@code TestSetRunListener} 32 * are decorators. They are used as delegators in interface adapters, see the implementations of 33 * JUnit's {@code RunListener RunListener-s}. 34 * <br> 35 * The serialization of data in {@link TestReportListener} ensures that the ReportEntries are transferred 36 * from the fork to the plugin. 37 * <br> 38 * Note: The adapters in the module <i>surefire-junit47</i> are temporal and will be removed after we have fixed 39 * the SUREFIRE-1860 and XML reporter in SUREFIRE-1643. The adapters are a workaround of a real fix in both Jira issues. 40 * 41 * @param <T> usually {@link TestOutputReportEntry} or {@link OutputReportEntry} 42 */ 43 public interface TestReportListener<T extends OutputReportEntry> 44 extends RunListener, TestOutputReceiver<T>, ConsoleLogger {}