Class ErrorReportingTestListener
java.lang.Object
com.carrotsearch.gradle.buildinfra.testing.ErrorReportingTestListener
- All Implemented Interfaces:
org.gradle.api.tasks.testing.TestListener, org.gradle.api.tasks.testing.TestOutputListener
public class ErrorReportingTestListener
extends Object
implements org.gradle.api.tasks.testing.TestOutputListener, org.gradle.api.tasks.testing.TestListener
An error reporting listener that queues test output streams and displays them on failure.
Heavily inspired by Elasticsearch's ErrorReportingTestListener (ASL 2.0 licensed).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionErrorReportingTestListener(org.gradle.api.logging.Logger taskLogger, org.gradle.internal.logging.text.StyledTextOutput styledOut, ReproduceLineExtension reproduceLineExtension, org.gradle.api.tasks.testing.logging.TestLogging testLogging, Path spillDir, Path outputsDir, boolean verboseMode, boolean fullOutputOnErrorMode) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterSuite(org.gradle.api.tasks.testing.TestDescriptor suite, org.gradle.api.tasks.testing.TestResult result) voidafterTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestResult result) voidbeforeSuite(org.gradle.api.tasks.testing.TestDescriptor testDescriptor) voidbeforeTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor) static StringgetOutputLogName(org.gradle.api.tasks.testing.TestDescriptor suite) voidonOutput(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestOutputEvent outputEvent)
-
Constructor Details
-
ErrorReportingTestListener
public ErrorReportingTestListener(org.gradle.api.logging.Logger taskLogger, org.gradle.internal.logging.text.StyledTextOutput styledOut, ReproduceLineExtension reproduceLineExtension, org.gradle.api.tasks.testing.logging.TestLogging testLogging, Path spillDir, Path outputsDir, boolean verboseMode, boolean fullOutputOnErrorMode)
-
-
Method Details
-
onOutput
public void onOutput(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestOutputEvent outputEvent) - Specified by:
onOutputin interfaceorg.gradle.api.tasks.testing.TestOutputListener
-
beforeSuite
public void beforeSuite(org.gradle.api.tasks.testing.TestDescriptor testDescriptor) - Specified by:
beforeSuitein interfaceorg.gradle.api.tasks.testing.TestListener
-
beforeTest
public void beforeTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor) - Specified by:
beforeTestin interfaceorg.gradle.api.tasks.testing.TestListener
-
afterSuite
public void afterSuite(org.gradle.api.tasks.testing.TestDescriptor suite, org.gradle.api.tasks.testing.TestResult result) - Specified by:
afterSuitein interfaceorg.gradle.api.tasks.testing.TestListener
-
getOutputLogName
-
afterTest
public void afterTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestResult result) - Specified by:
afterTestin interfaceorg.gradle.api.tasks.testing.TestListener
-