public abstract class AbstractProbeListener
extends org.junit.runner.notification.RunListener
| Modifier and Type | Field and Description |
|---|---|
protected static io.probedock.client.common.config.Configuration |
configuration
Probe Dock configuration
|
protected Long |
runStartedDate
Store the date when the run started
|
protected Map<String,Long> |
testStartDates
Store the start date of a test to measure the approximative execution
time of a each test.
|
| Constructor and Description |
|---|
AbstractProbeListener()
Constructor
|
AbstractProbeListener(String category)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExctractor(TestMetaDataExtratctor extractor)
Add an extractor to the list of extractors
|
protected String |
createAndlogStackTrace(org.junit.runner.notification.Failure failure)
Build a stack trace string
|
protected io.probedock.client.common.model.v1.TestResult |
createTestResult(org.junit.runner.Description description,
io.probedock.client.annotations.ProbeTest mAnnotation,
io.probedock.client.annotations.ProbeTestClass cAnnotation,
boolean passed,
String message)
Create a test based on the different information gathered from class, method and description
|
protected String |
getCategory(io.probedock.client.annotations.ProbeTestClass classAnnotation,
io.probedock.client.annotations.ProbeTest methodAnnotation)
Retrieve the category to apply to the test
|
protected io.probedock.client.annotations.ProbeTestClass |
getClassAnnotation(org.junit.runner.Description description)
Try to retrieve the
ProbeTestClass annotation of the test class |
protected io.probedock.client.annotations.ProbeTest |
getMethodAnnotation(org.junit.runner.Description description)
Try to retrieve the
ProbeTest annotation of the test method |
protected String |
getTechnicalName(org.junit.runner.Description description)
Build the technical name
|
void |
setFullStackTraces(Boolean fullStackTraces) |
void |
testFinished(org.junit.runner.Description description) |
void |
testRunStarted(org.junit.runner.Description description) |
void |
testStarted(org.junit.runner.Description description) |
protected static final io.probedock.client.common.config.Configuration configuration
protected Long runStartedDate
public AbstractProbeListener()
public AbstractProbeListener(String category)
category - The test categorypublic void testStarted(org.junit.runner.Description description)
throws Exception
testStarted in class org.junit.runner.notification.RunListenerExceptionpublic void testFinished(org.junit.runner.Description description)
throws Exception
testFinished in class org.junit.runner.notification.RunListenerExceptionpublic void setFullStackTraces(Boolean fullStackTraces)
fullStackTraces - The full stack trace modepublic void addExctractor(TestMetaDataExtratctor extractor)
extractor - Extractor to addpublic void testRunStarted(org.junit.runner.Description description)
throws Exception
testRunStarted in class org.junit.runner.notification.RunListenerExceptionprotected io.probedock.client.annotations.ProbeTest getMethodAnnotation(org.junit.runner.Description description)
throws NoSuchMethodException
ProbeTest annotation of the test methoddescription - The representation of the testNoSuchMethodExceptionprotected io.probedock.client.annotations.ProbeTestClass getClassAnnotation(org.junit.runner.Description description)
ProbeTestClass annotation of the test classdescription - The representation of the testprotected io.probedock.client.common.model.v1.TestResult createTestResult(org.junit.runner.Description description,
io.probedock.client.annotations.ProbeTest mAnnotation,
io.probedock.client.annotations.ProbeTestClass cAnnotation,
boolean passed,
String message)
description - jUnit test descriptionmAnnotation - Method annotationcAnnotation - Class annotationpassed - Test passing or notmessage - Message associated to the test resultprotected String getCategory(io.probedock.client.annotations.ProbeTestClass classAnnotation, io.probedock.client.annotations.ProbeTest methodAnnotation)
classAnnotation - The roxable class annotation to get the override categorymethodAnnotation - The roxable annotation to get the override categoryprotected String createAndlogStackTrace(org.junit.runner.notification.Failure failure)
failure - The failure to get the exceptions and so onprotected String getTechnicalName(org.junit.runner.Description description)
description - The description to retrieve the unique name of a testCopyright © 2015. All rights reserved.