Class ErrorReportingTestListener
java.lang.Object
com.carrotsearch.gradle.randomizedtesting.ErrorReportingTestListener
- All Implemented Interfaces:
org.gradle.api.tasks.testing.TestListener,org.gradle.api.tasks.testing.TestOutputListener
public class ErrorReportingTestListener
extends java.lang.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 Modifier and Type Class Description static classErrorReportingTestListener.TestKey -
Constructor Summary
Constructors Constructor Description ErrorReportingTestListener(org.gradle.api.tasks.testing.logging.TestLogging testLogging, java.nio.file.Path spillDir, java.nio.file.Path outputsDir, org.gradle.api.provider.Provider<java.lang.Boolean> verboseMode) -
Method Summary
Modifier and Type Method Description voidafterSuite(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 suite)voidbeforeTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor)static java.lang.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.tasks.testing.logging.TestLogging testLogging, java.nio.file.Path spillDir, java.nio.file.Path outputsDir, org.gradle.api.provider.Provider<java.lang.Boolean> verboseMode)
-
-
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 suite)- 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
public static java.lang.String getOutputLogName(org.gradle.api.tasks.testing.TestDescriptor suite) -
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
-