1 package org.apache.maven.surefire.report; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 /** 23 * Used by providers to report results. 24 * Using this interface integrates the providers together into a common reporting infrastructure. 25 * <p/> 26 * An instance of a reporter is not guaranteed to be thread-safe and concurrent test frameworks 27 * must request an instance of a reporter per-thread from the ReporterFactory. 28 */ 29 public interface RunListener 30 { 31 /** 32 * Indicates the start of a given test-set 33 * 34 * @param report the report entry describing the testset 35 * @throws ReporterException When reporting fails 36 */ 37 void testSetStarting( ReportEntry report ); 38 39 /** 40 * Indicates end of a given test-set 41 * 42 * @param report the report entry describing the testset 43 * @throws ReporterException When reporting fails 44 */ 45 void testSetCompleted( ReportEntry report ); 46 47 /** 48 * Event fired when a test is about to start 49 * 50 * @param report The report entry to log for 51 */ 52 void testStarting( ReportEntry report ); 53 54 /** 55 * Event fired when a test ended successfully 56 * 57 * @param report The report entry to log for 58 */ 59 void testSucceeded( ReportEntry report ); 60 61 /** 62 * Event fired when a test assumption failure was encountered. 63 * An assumption failure indicates that the test is not relevant 64 * 65 * @param report The report entry to log for 66 */ 67 void testAssumptionFailure( ReportEntry report ); 68 69 70 /** 71 * Event fired when a test ended with an error (non anticipated problem) 72 * 73 * @param report The report entry to log for 74 */ 75 void testError( ReportEntry report ); 76 77 /** 78 * Event fired when a test ended with a failure (anticipated problem) 79 * 80 * @param report The report entry to log for 81 */ 82 void testFailed( ReportEntry report ); 83 84 /** 85 * Event fired when a test is skipped 86 * 87 * @param report The report entry to log for 88 */ 89 void testSkipped( ReportEntry report ); 90 }