Class XmlWriterTestCallback
- java.lang.Object
-
- de.gebit.integrity.runner.callbacks.TestRunnerCallback
-
- de.gebit.integrity.runner.callbacks.AbstractTestRunnerCallback
-
- de.gebit.integrity.runner.callbacks.xml.XmlWriterTestCallback
-
public class XmlWriterTestCallback extends AbstractTestRunnerCallback
Test runner callback which writes to an XML result file. This runner may optionally add an XHTML transform to the file which allows to render the results in a nice, readable layout in any good browser.- Author:
- Rene Schneider - initial API and implementation
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
abortMessage
In case of an abortion, the message is stored here to be used later.protected static java.lang.String
CALL_ELEMENT
The Constant CALL_ELEMENT.protected static java.lang.String
CALL_EXCEPTION_COUNT_ATTRIBUTE
The Constant CALL_EXCEPTION_COUNT_ATTRIBUTE.protected static java.lang.String
CALL_NAME_ELEMENT
The Constant CALL_NAME_ELEMENT.protected boolean
captureConsoleOutput
Whether console output shall be captured.protected java.lang.ClassLoader
classLoader
The classloader to use.protected static java.lang.String
COMMENT_ELEMENT
The Constant COMMENT_ELEMENT.protected static java.lang.String
COMMENT_TEXT_ATTRIBUTE
The Constant COMMENT_TEXT_ATTRIBUTE.protected static java.lang.String
COMMENT_TYPE_ATTRIBUTE
The Constant COMMENT_TYPE_ATTRIBUTE.protected static java.lang.String
COMMENT_TYPE_SUITETITLE
The Constant COMMENT_TYPE_SUITETITLE.protected static java.lang.String
COMMENT_TYPE_TITLE
The Constant COMMENT_TYPE_TITLE.protected static java.lang.String
COMPARISON_COLLECTION_ELEMENT
The Constant COMPARISON_COLLECTION_ELEMENT.protected static java.lang.String
COMPARISON_ELEMENT
The Constant COMPARISON_ELEMENT.protected static java.lang.String
COMPARISON_NAME_ATTRIBUTE
The Constant COMPARISON_NAME_ATTRIBUTE.protected static java.lang.String
CONSOLE_ELEMENT
The Constant CONSOLE_ELEMENT.protected static java.lang.String
CONSOLE_LINE_SOURCE_ATTRIBUTE
The Constant CONSOLE_LINE_SOURCE_ATTRIBUTE.protected static java.lang.String
CONSOLE_LINE_STDERR_ELEMENT
The Constant CONSOLE_LINE_STDERR_ELEMENT.protected static java.lang.String
CONSOLE_LINE_STDOUT_ELEMENT
The Constant CONSOLE_LINE_STDOUT_ELEMENT.protected static java.lang.String
CONSOLE_LINE_TEXT_ATTRIBUTE
The Constant CONSOLE_LINE_TEXT_ATTRIBUTE.protected static java.lang.String
CONSOLE_LINE_TIME_ATTRIBUTE
The Constant CONSOLE_LINE_TEMP_TIME_ATTRIBUTE.protected static java.lang.String
CONSOLE_LINECOUNT_ATTRIBUTE
The Constant CONSOLE_LINECOUNT_ATTRIBUTE.protected static java.lang.String
CONSOLE_TEMP_ENDTIME_ATTRIBUTE
The Constant CONSOLE_TEMP_ENDTIME_ATTRIBUTE.protected static java.lang.String
CONSOLE_TEMP_STARTTIME_ATTRIBUTE
The Constant CONSOLE_TEMP_STARTTIME_ATTRIBUTE.protected static java.lang.String
CONSOLE_TRUNCATED_ATTRIBUTE
The Constant CONSOLE_TRUNCATED_ATTRIBUTE.protected ConsoleInterceptionAggregator
consoleInterceptor
The interception service used to intercept console output.protected java.util.Stack<org.jdom.Element>
currentElement
The stack of elements.protected static java.text.DateFormat
DATE_FORMAT
The generally used date format (coarse-grained date/time).protected static int
DEFAULT_MAX_CONSOLE_LINE_SIZE
Maximum size of a single console line default.protected static int
DEFAULT_MAX_CONSOLE_LINES
Default maximum number of lines of console output that is added to a single test/call.protected static int
DEFAULT_MAX_FORMATTED_STRING_SIZE
Default max formatted string size.protected static java.lang.String
DIVIDER_ELEMENT
The Constant DIVIDER_ELEMENT.protected static java.lang.String
DIVIDER_TEXT_ATTRIBUTE
The Constant DIVIDER_TEXT_ATTRIBUTE.protected org.jdom.Document
document
The XML document that will be created.protected static java.lang.String
EXCEPTION_COUNT_ATTRIBUTE
The Constant EXCEPTION_COUNT_ATTRIBUTE.protected static java.lang.String
EXECUTION_DURATION_ATTRIBUTE
The Constant EXECUTION_DURATION_ATTRIBUTE.protected static java.text.DecimalFormat
EXECUTION_TIME_FORMAT
The time format used to format execution times.protected long
executionStartTime
The timestamp of execution start.protected static java.lang.String
EXTENDED_RESULT_COLLECTION_ELEMENT
The Constant EXTENDED_RESULT_COLLECTION_ELEMENT.protected static java.lang.String
EXTENDED_RESULT_ELEMENT_TITLE_ATTRIBUTE
The Constant EXTENDED_RESULT_ELEMENT_TYPE_ATTRIBUTE.protected static java.lang.String
EXTENDED_RESULT_HTML_ELEMENT
The Constant EXTENDED_RESULT_HTML_ELEMENT.protected static java.lang.String
EXTENDED_RESULT_IMAGE_ELEMENT
The Constant EXTENDED_RESULT_IMAGE_ELEMENT.protected static java.lang.String
EXTENDED_RESULT_IMAGE_ELEMENT_HEIGHT_ATTRIBUTE
The Constant EXTENDED_RESULT_IMAGE_ELEMENT_HEIGHT_ATTRIBUTE.protected static java.lang.String
EXTENDED_RESULT_IMAGE_ELEMENT_TYPE_ATTRIBUTE
The Constant EXTENDED_RESULT_IMAGE_ELEMENT_TYPE_ATTRIBUTE.protected static java.lang.String
EXTENDED_RESULT_IMAGE_ELEMENT_WIDTH_ATTRIBUTE
The Constant EXTENDED_RESULT_IMAGE_ELEMENT_WIDTH_ATTRIBUTE.protected static java.lang.String
EXTENDED_RESULT_TEXT_ELEMENT
The Constant EXTENDED_RESULT_TEXT_ELEMENT.protected static java.lang.String
FAILURE_COUNT_ATTRIBUTE
The Constant FAILURE_COUNT_ATTRIBUTE.protected static java.lang.String
FINALIZATION_TEST_RESULT_ELEMENT
The Constant POST_INVOCATION_RESULT_ELEMENT.protected static java.lang.String
FIXTURE_DESCRIPTION_ATTRIBUTE
The Constant FIXTURE_DESCRIPTION_ATTRIBUTE.protected static java.lang.String
FIXTURE_METHOD_ATTRIBUTE
The Constant FIXTURE_METHOD_ATTRIBUTE.protected static java.lang.String
FIXTURELOG_ELEMENT
The Constant FIXTURELOG_ELEMENT.protected static java.lang.String
FIXTURELOG_LINE_ELEMENT
The Constant FIXTURELOG_LINE_ELEMENT.protected static java.lang.String
FIXTURELOG_LINE_TEXT_ATTRIBUTE
The Constant FIXTURELOG_LINE_TEXT_ATTRIBUTE.protected static java.lang.String
FIXTURELOG_LINE_TIME_ATTRIBUTE
The Constant FIXTURELOG_LINE_TIME_ATTRIBUTE.protected static java.lang.String
FIXTURELOG_LINECOUNT_ATTRIBUTE
The Constant FIXTURELOG_LINECOUNT_ATTRIBUTE.protected AggregatingFixtureLogger
fixtureLogger
The fixture logger.protected static java.lang.String
FORK_DESCRIPTION_ATTRIBUTE
The Constant FORK_DESCRIPTION_ATTRIBUTE.protected static java.lang.String
FORK_NAME_ATTRIBUTE
The Constant FORK_NAME_ATTRIBUTE.protected static java.lang.String
ID_ATTRIBUTE
The Constant ID_ATTRIBUTE.protected long
idCounter
Counter used to generate unique IDs for a lot of XML elements.protected static java.text.SimpleDateFormat
ISO_DATE_FORMAT
The ISO-standardized date format (this is mostly added to the XML to allow for easy transformation into a JUnit-compatible result XML.protected boolean
isTracingEnabled
Whether stack tracing is enabled.protected static java.lang.String
LINE_NUMBER_ATTRIBUTE
The constant LINE_NUMBER_ATTRIBUTE.protected static java.util.regex.Pattern
MARKDOWN_URL_PATTERN
The pattern for Markdown-style URL detection.protected static int
MAX_CONSOLE_LINE_SIZE
Maximum size of a single console line.protected static int
MAX_CONSOLE_LINES
Maximum number of lines of console output that is added to a single test/call.protected static int
MAX_FORMATTED_STRING_SIZE
The maximum length of serializedFormattedString
s in Unicode code units.protected boolean
nextTitleCommentIsSuiteTitle
Whether the next title comment is to be treated as a suite title.protected java.io.File
outputFile
The file in which to serialize the document.protected static java.lang.String
PARAMETER_COLLECTION_ELEMENT
The Constant PARAMETER_COLLECTION_ELEMENT.protected static java.lang.String
PARAMETER_ELEMENT
The Constant PARAMETER_ELEMENT.protected static java.lang.String
PARAMETER_NAME_ATTRIBUTE
The Constant PARAMETER_NAME_ATTRIBUTE.protected static java.lang.String
PARAMETER_VALUE_ATTRIBUTE
The Constant PARAMETER_VALUE_ATTRIBUTE.protected ParameterResolver
parameterResolver
The parameter resolver to use.protected static java.lang.String
RESULT_COLLECTION_ELEMENT
The Constant RESULT_COLLECTION_ELEMENT.protected static java.lang.String
RESULT_ELEMENT
The Constant RESULT_ELEMENT.protected static java.lang.String
RESULT_EXCEPTION_MESSAGE_ATTRIBUTE
The Constant RESULT_EXCEPTION_MESSAGE_ATTRIBUTE.protected static java.lang.String
RESULT_EXCEPTION_TRACE_ATTRIBUTE
The Constant RESULT_EXCEPTION_TRACE_ATTRIBUTE.protected static java.lang.String
RESULT_EXPECTED_VALUE_ATTRIBUTE
The Constant RESULT_EXPECTED_VALUE_ATTRIBUTE.protected static java.lang.String
RESULT_REAL_VALUE_ATTRIBUTE
The Constant RESULT_REAL_VALUE_ATTRIBUTE.protected static java.lang.String
RESULT_TYPE_ATTRIBUTE
The Constant RESULT_TYPE_ATTRIBUTE.protected static java.lang.String
RESULT_TYPE_EXCEPTION
The Constant RESULT_TYPE_EXCEPTION.protected static java.lang.String
RESULT_TYPE_FAILURE
The Constant RESULT_TYPE_FAILURE.protected static java.lang.String
RESULT_TYPE_SUCCESS
The Constant RESULT_TYPE_SUCCESS.protected static java.lang.String
RETURN_VARIABLE_ASSIGNMENT_COLLECTION_ELEMENT
The Constant RETURN_VARIABLE_ASSIGNMENT_COLLECTION_ELEMENT.protected static java.lang.String
ROOT_ELEMENT
The Constant ROOT_ELEMENT.protected boolean
rootSuiteWasStarted
This flag stores the information whether the root suite (= first suite we enter) has already been entered.protected static java.lang.String
SETUP_COLLECTION_ELEMENT
The Constant SETUP_COLLECTION_ELEMENT.protected static java.lang.String
STATEMENT_COLLECTION_ELEMENT
The Constant STATEMENT_COLLECTION_ELEMENT.protected static java.lang.String
SUCCESS_COUNT_ATTRIBUTE
The Constant SUCCESS_COUNT_ATTRIBUTE.protected static java.lang.String
SUITE_DISPLAY_ATTRIBUTE
The Constant SUITE_DISPLAY_ATTRIBUTE.protected static java.lang.String
SUITE_DISPLAY_VALUE_INLINE
The Constant SUITE_DISPLAY_VALUE_INLINE.protected static java.lang.String
SUITE_ELEMENT
The Constant SUITE_ELEMENT.protected static java.lang.String
SUITE_NAME_ATTRIBUTE
The Constant SUITE_NAME_ATTRIBUTE.protected static java.lang.String
SUITE_TITLE_ATTRIBUTE
The Constant SUITE_TITLE_ATTRIBUTE.protected static java.lang.String
SYSPARAM_ENABLE_TRACE_OUTPUT
System property name to enable XML Writer Stack Trace output.protected static java.lang.String
SYSPARAM_MAX_CONSOLE_LINE_SIZE
System property name to override max console line size.protected static java.lang.String
SYSPARAM_MAX_CONSOLE_LINES
System property name to override max console lines.protected static java.lang.String
SYSPARAM_MAX_FORMATTED_STRING_SIZE
System property name to override max formatted string size.protected static java.lang.String
SYSPARAM_TRANSFORM_THREAD_STACK_SIZE
System property name for overriding transform thread stack size.protected static java.lang.String
SYSPARAM_XSLT_RESOURCE
System property name to override XSLT resource.protected static java.lang.String
TABLETEST_ELEMENT
The Constant TABLETEST_ELEMENT.protected org.jdom.Element
tableTestResultCollectionElement
Table tests must collect results in an element, which is referenced here.protected static java.lang.String
TEARDOWN_COLLECTION_ELEMENT
The Constant TEARDOWN_COLLECTION_ELEMENT.protected static java.lang.String
TEMPORARY_ATTRIBUTE_PREFIX
This prefix is used to mark temporary attributes (these are to be stripped before elements are serialized for the final result).protected static java.lang.String
TEST_ELEMENT
The Constant TEST_ELEMENT.protected static java.lang.String
TEST_EXCEPTION_COUNT_ATTRIBUTE
The Constant TEST_EXCEPTION_COUNT_ATTRIBUTE.protected static java.lang.String
TEST_NAME_ELEMENT
The Constant TEST_NAME_ELEMENT.protected static java.lang.String
TEST_RUN_ABORT_MESSAGE_ATTRIBUTE
The Constant TEST_RUN_ABORT_MESSAGE_ATTRIBUTE.protected static java.lang.String
TEST_RUN_DURATION
The Constant TEST_RUN_DURATION.protected static java.lang.String
TEST_RUN_NAME_ATTRIBUTE
The Constant TEST_RUN_NAME_ATTRIBUTE.protected static java.lang.String
TEST_RUN_TIMESTAMP
The Constant TEST_RUN_TIMESTAMP.protected static java.lang.String
TEST_RUN_TIMESTAMP_ISO8601
The Constant TEST_RUN_TIMESTAMP_ISO8601.protected TestFormatter
testFormatter
The test formatter to use.protected static java.lang.String
TIME_FORK_ATTRIBUTE
The Constant TIME_FORK_ATTRIBUTE.protected static java.lang.String
TIME_PROGRESSION_FACTOR_ATTRIBUTE
The Constant TIME_PROGRESSION_FACTOR_ATTRIBUTE.protected static java.lang.String
TIME_SET_ELEMENT
The Constant TIME_SET_ELEMENT.protected static java.lang.String
TIME_SET_TIMES_COLLECTION_ELEMENT
The Constant TIME_SET_TIMES_COLLECTION_ELEMENT.protected static java.lang.String
TIME_SET_TIMES_ELEMENT
The Constant TIME_SET_TIMES_ELEMENT.protected static java.lang.String
TIME_SET_TIMES_ELEMENT_FORK_ATTRIBUTE
The Constant TIME_SET_TIMES_ELEMENT_FORK_ATTRIBUTE.protected static java.lang.String
TIME_START_ATTRIBUTE
The Constant TIME_START_ATTRIBUTE.protected static java.lang.String
TIME_TEXT_ATTRIBUTE
The Constant TIME_TEXT_ATTRIBUTE.protected static java.text.DateFormat
TIMESTAMP_FORMAT
The generally used timestamp format (fine-grained date/time).protected java.lang.String
title
The title of the result document.protected static int
TRANSFORM_THREAD_STACK_SIZE_DEFAULT
Default stack size for the XSLT transform thread.protected TransformHandling
transformHandling
How the XML -> XHTML transform shall be handled.protected static java.util.regex.Pattern
URL_PATTERN
The pattern for URL detection.protected static java.lang.String
VARIABLE_ASSIGNMENT_ELEMENT
The Constant VARIABLE_ASSIGNMENT_ELEMENT.protected static java.lang.String
VARIABLE_DEFINITION_COLLECTION_ELEMENT
The Constant VARIABLE_DEFINITION_COLLECTION_ELEMENT.protected static java.lang.String
VARIABLE_ELEMENT
The Constant VARIABLE_ELEMENT.protected static java.lang.String
VARIABLE_NAME_ATTRIBUTE
The Constant VARIABLE_NAME_ATTRIBUTE.protected static java.lang.String
VARIABLE_TARGET_ATTRIBUTE
The Constant VARIABLE_NAME_ATTRIBUTE.protected static java.lang.String
VARIABLE_UPDATE_ELEMENT
The Constant VARIABLE_UPDATE_ELEMENT.protected static java.lang.String
VARIABLE_UPDATE_PARAMETER_NAME_ATTRIBUTE
The Constant VARIABLE_UPDATE_PARAMETER_NAME_ATTRIBUTE.protected static java.lang.String
VARIABLE_VALUE_ATTRIBUTE
The Constant VARIABLE_VALUE_ATTRIBUTE.protected VariableManager
variableManager
The variable manager to use.protected static java.lang.String
VARIANT_DESCRIPTION_ATTRIBUTE
The Constant VARIANT_DESCRIPTION_ATTRIBUTE.protected static java.lang.String
VARIANT_ELEMENT
The Constant VARIANT_ELEMENT.protected static java.lang.String
VARIANT_NAME_ATTRIBUTE
The Constant VARIANT_NAME_ATTRIBUTE.protected static java.lang.String
VERSION_ATTRIBUTE
The constant VERSION_ATTRIBUTE.protected static java.lang.String
XSLT_RESOURCE_NAME
The name of the XSLT script resource.protected static java.lang.String
XSLT_TRANSFORMER_FACTORY_PROPERTY
The XSLT transformer factory property.-
Fields inherited from class de.gebit.integrity.runner.callbacks.AbstractTestRunnerCallback
valueConverter
-
Fields inherited from class de.gebit.integrity.runner.callbacks.TestRunnerCallback
dryRun, forkInExecution, server
-
-
Constructor Summary
Constructors Constructor Description XmlWriterTestCallback(java.lang.ClassLoader aClassLoader, java.io.File anOutputFile, java.lang.String aTitle, TransformHandling aTransformHandling, boolean aCaptureConsoleFlag)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addCurrentTime(org.jdom.Element anElement)
Adds a timestamp based on the current time to the provided element.protected void
addFixtureLogging(org.jdom.Element anElement)
Adds fixture log output to the provided element, if any is present.protected void
addId(org.jdom.Element anElement)
Adds the ID attribute to the element and increments the ID counter for the next element.protected void
addLineNumber(org.jdom.Element anElement, org.eclipse.emf.ecore.EObject anObject)
Adds the line number to the element where the givenEObject
starts.protected void
addSuiteSummaryResultToElement(org.jdom.Element anElement, SuiteSummaryResult aResult)
Adds the given suite summary result totals to the given result element as attributes.protected void
addVersion(org.jdom.Element anElement)
Adds the version number of the test runner bundle to the given element.protected java.lang.String
cleanXMLAttributeValue(java.lang.String aValue)
Cleans a given attribute values from characters that are illegal in XML attributes.protected org.jdom.Element
createExtendedResultElement(java.util.List<ExtendedResultFixture.ExtendedResult> someExtendedResults)
Creates an extended result element.protected java.util.List<org.jdom.Content>
detectMarkdownURLs(java.lang.String aText)
Finds Markdown-style URLs in the given text and parses all into XML elements.protected java.util.List<org.jdom.Content>
detectSimpleURLs(java.lang.String aText)
Finds simple URLs in the given text and parses all into XML elements.protected int
determineTransformThreadStackSize()
Determines the stack size used for the XSLT transform thread.protected java.lang.String
getStringForElement(org.jdom.Element anElement)
<<<<<<< HEAD ======= Converts the provided element into a string with the element name and all its attributes.protected java.io.InputStream
getXsltStream()
Gets the xslt stream.protected void
internalOnCallFinish(org.jdom.Element aCallResultElement, org.jdom.Element anExtendedResultElement)
Internal version ofonCallFinish(Call, CallResult)
.protected void
internalOnCallStart(org.jdom.Element aCallElement)
Internal version ofonCallStart(Call)
.protected void
internalOnReturnVariableAssignment(org.jdom.Element aReturnAssignmentElement)
Internal version of#onReturnVariableAssignment(SuiteReturn, Suite, Object)
.protected void
internalOnSetupFinish(org.jdom.Element aSuiteResultElement)
Internal version ofonSetupFinish(SuiteDefinition, SuiteResult)
.protected void
internalOnSetupStart(org.jdom.Element aSetupElement)
Internal version ofonSetupStart(SuiteDefinition)
.protected void
internalOnSuiteFinish(org.jdom.Element aSuiteResultElement)
Internal version of#onSuiteFinish(Suite, SuiteResult)
.protected void
internalOnSuiteStart(org.jdom.Element aSuiteElement)
Internal version ofonSuiteStart(Suite)
.protected void
internalOnTableTestFinish(org.jdom.Element aResultCollectionElement, org.jdom.Element anExtendedResultElement, org.jdom.Element aPostInvocationResultElement)
Internal version ofonTableTestFinish(TableTest, TestResult)
.protected void
internalOnTableTestStart(org.jdom.Element aTestElement, org.jdom.Element aResultCollectionElement)
Internal version ofonTableTestStart(TableTest)
.protected void
internalOnTearDownFinish(org.jdom.Element aSuiteResultElement)
Internal version ofonTearDownFinish(SuiteDefinition, SuiteResult)
.protected void
internalOnTearDownStart(org.jdom.Element aTearDownElement)
Internal version ofonTearDownStart(SuiteDefinition)
.protected void
internalOnTestFinish(org.jdom.Element aResultCollectionElement, org.jdom.Element anExtendedResultElement)
Internal version ofonTestFinish(Test, TestResult)
.protected void
internalOnTestStart(org.jdom.Element aTestElement)
Internal version ofonTestStart(Test)
.protected void
internalOnTimeSetFinish(org.jdom.Element aTimeSetElement)
Internal version of#onTimeSetFinish(TimeSet, SuiteDefinition, List, String, String)
.protected void
internalOnTimeSetStart(org.jdom.Element aTimeSetElement)
Internal version ofonTimeSetStart(TimeSet, SuiteDefinition, List)
.protected void
internalOnVariableAssignment(org.jdom.Element aVariableAssignmentElement)
Internal version of#onVariableAssignment(VariableEntity, SuiteDefinition, Object)
.protected void
internalOnVariableDefinition(org.jdom.Element aVariableElement, boolean aGlobalFlag)
Internal version ofonVariableDefinition(VariableEntity, SuiteDefinition, Object)
.protected void
internalOnVisibleComment(org.jdom.Element aCommentElement)
Internal version of#onVisibleComment(String)
.protected void
internalOnVisibleDivider(org.jdom.Element aDividerElement)
Internal version of#onVisibleDivider(String)
.protected static java.lang.String
nanoTimeToString(long aNanosecondValue)
Converts a nanosecond time value into a string, according toEXECUTION_TIME_FORMAT
.void
onAbortExecution(java.lang.String anAbortExecutionMessage, java.lang.String anAbortExecutionStackTrace)
Called when test execution is aborted prematurely due to anAbortExecutionException
- either thrown locally or by a fork.protected void
onAnyKindOfSubTestFinish(MethodReference aMethod, SuiteStatementWithResult aStatement, org.jdom.Element aResultCollectionElement, TestSubResult aSubResult, java.util.Map<java.lang.String,java.lang.Object> aParameterMapForText, java.util.Map<java.lang.String,java.lang.Object> aParameterMap)
Used to write sub-test results.void
onCallbackProcessingEnd()
On callback processing end.void
onCallbackProcessingStart()
On callback processing start.void
onCallFinish(Call aCall, CallResult aResult)
On call finish.void
onCallStart(Call aCall)
On call start.void
onConstantDefinition(ConstantEntity aDefinition, SuiteDefinition aSuite, java.lang.Object aValue, boolean aParameterizedFlag)
On constant definition.void
onExecutionFinish(TestModel aModel, SuiteSummaryResult aResult)
On execution finish.void
onExecutionStart(TestModel aModel, VariantDefinition aVariant)
On execution start.void
onMessageFromFork(TestRunnerCallbackMethods aMethod, java.io.Serializable... someObjects)
On message from fork.void
onReturnVariableAssignment(SuiteReturn aReturn, VariableEntity aSource, VariableEntity aTarget, Suite aSuite, java.lang.Object aValue)
Called when a return variable value from a suite is assigned to the respective local variable in the calling suite.void
onSetupFinish(SuiteDefinition aSetupSuite, SuiteResult aResult)
On setup finish.void
onSetupSkipped(SuiteDefinition aSetupSuite, SuiteSkipReason aReason)
Called when a setup suite is being skipped.void
onSetupStart(SuiteDefinition aSetupSuite)
On setup start.void
onSuiteFinish(Suite aSuite, SuiteSummaryResult aResult)
On suite finish.void
onSuiteSkipped(Suite aSuite, SuiteSkipReason aReason)
Called when a suite call is being skipped.void
onSuiteStart(Suite aSuite)
On suite start.void
onTableTestFinish(TableTest aTableTest, TestResult aResult)
On table test finish.void
onTableTestRowFinish(TableTest aTableTest, TableTestRow aRow, TestSubResult aSubResult)
On table test row finish.void
onTableTestRowStart(TableTest aTableTest, TableTestRow aRow)
On table test row start.void
onTableTestStart(TableTest aTest)
On table test start.void
onTearDownFinish(SuiteDefinition aTearDownSuite, SuiteResult aResult)
On tear down finish.void
onTearDownSkipped(SuiteDefinition aTearDownSuite, SuiteSkipReason aReason)
Called when a teardown suite is being skipped.void
onTearDownStart(SuiteDefinition aTearDownSuite)
On tear down start.void
onTestFinish(Test aTest, TestResult aResult)
On test finish.void
onTestStart(Test aTest)
On test start.void
onTimeSetFinish(TimeSet aTimeSet, TimeSetResult aResult)
Called when the test time was set.void
onTimeSetStart(TimeSet aTimeSet, SuiteDefinition aSuite, java.util.List<ForkDefinition> someForks)
Called when the test time will be set.void
onVariableAssignment(VariableAssignment anAssignment, VariableEntity aDefinition, SuiteDefinition aSuite, java.lang.Object aValue)
Called when a variable is being assigned.void
onVariableDefinition(VariableEntity aDefinition, SuiteDefinition aSuite, java.lang.Object anInitialValue)
On variable definition.void
onVisibleComment(java.lang.String aCommentText, boolean anIsTitle, VisibleComment aCommentElement)
On visible comment.void
onVisibleDivider(java.lang.String aDividerText, VisibleDivider aDividerElement)
On visible divider.protected java.util.List<org.jdom.Content>
parseComment(java.lang.String aCommment)
Parses a comment into a list ofContent
elements.protected java.lang.String
processConsoleLogLine(java.lang.String aRawLine)
Truncates the given line and replaces certain characters (like tabs).protected void
sendElementsToMaster(TestRunnerCallbackMethods aMethod, org.jdom.Element... someElements)
Sends an XML element to the masterXmlWriterTestCallback
.protected void
setAttributeGuarded(org.jdom.Element anElement, java.lang.String anAttributeName, java.lang.String aValue)
Sets the given attribute to the given value in the element.protected org.jdom.Element
stackFind(java.lang.String anElementName)
>>>>>>> v0.15.x_bugfix Finds a given element in the stack.protected org.jdom.Element
stackPeek()
Peeks onto the stack.protected org.jdom.Element
stackPop()
Pops an element from the stack.protected void
stackPush(org.jdom.Element anElement)
Pushes an element on the stack.protected static java.lang.String
stackTraceToString(java.lang.Throwable anException)
Formats a stack trace into a single string with line-breaks.protected void
stripTemporaryAttributes(org.jdom.Element anElement)
Strips any temporary attributes (recognized by the prefixTEMPORARY_ATTRIBUTE_PREFIX
) from an element hierarchy.protected void
transformResult(java.io.FileOutputStream aTargetStream)
Performs the XSLT transformation and writes the result HTML file into the provided target stream.-
Methods inherited from class de.gebit.integrity.runner.callbacks.AbstractTestRunnerCallback
containsNestedObject, containsNestedObject, convertResultValueToFormattedStringGuarded, convertResultValueToStringGuarded, valueToString
-
Methods inherited from class de.gebit.integrity.runner.callbacks.TestRunnerCallback
getForkInExecution, isDryRun, isFork, receiveFromFork, sendToMaster, setDryRun, setForkInExecution, setRemotingServer
-
-
-
-
Field Detail
-
document
protected org.jdom.Document document
The XML document that will be created.
-
outputFile
protected java.io.File outputFile
The file in which to serialize the document.
-
title
protected java.lang.String title
The title of the result document.
-
executionStartTime
protected long executionStartTime
The timestamp of execution start.
-
idCounter
protected long idCounter
Counter used to generate unique IDs for a lot of XML elements.
-
transformHandling
protected TransformHandling transformHandling
How the XML -> XHTML transform shall be handled.
-
nextTitleCommentIsSuiteTitle
protected boolean nextTitleCommentIsSuiteTitle
Whether the next title comment is to be treated as a suite title.
-
classLoader
@Inject protected java.lang.ClassLoader classLoader
The classloader to use.
-
parameterResolver
@Inject protected ParameterResolver parameterResolver
The parameter resolver to use.
-
variableManager
@Inject protected VariableManager variableManager
The variable manager to use.
-
testFormatter
@Inject protected TestFormatter testFormatter
The test formatter to use.
-
consoleInterceptor
@Inject protected ConsoleInterceptionAggregator consoleInterceptor
The interception service used to intercept console output.
-
fixtureLogger
@Inject protected AggregatingFixtureLogger fixtureLogger
The fixture logger.
-
captureConsoleOutput
protected boolean captureConsoleOutput
Whether console output shall be captured.
-
currentElement
protected java.util.Stack<org.jdom.Element> currentElement
The stack of elements.
-
abortMessage
protected java.lang.String abortMessage
In case of an abortion, the message is stored here to be used later.
-
rootSuiteWasStarted
protected boolean rootSuiteWasStarted
This flag stores the information whether the root suite (= first suite we enter) has already been entered.
-
tableTestResultCollectionElement
protected org.jdom.Element tableTestResultCollectionElement
Table tests must collect results in an element, which is referenced here. Only valid and filled while a tabletest is running!
-
TEMPORARY_ATTRIBUTE_PREFIX
protected static final java.lang.String TEMPORARY_ATTRIBUTE_PREFIX
This prefix is used to mark temporary attributes (these are to be stripped before elements are serialized for the final result).- See Also:
- Constant Field Values
-
ROOT_ELEMENT
protected static final java.lang.String ROOT_ELEMENT
The Constant ROOT_ELEMENT.- See Also:
- Constant Field Values
-
TEST_RUN_NAME_ATTRIBUTE
protected static final java.lang.String TEST_RUN_NAME_ATTRIBUTE
The Constant TEST_RUN_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
TEST_RUN_TIMESTAMP
protected static final java.lang.String TEST_RUN_TIMESTAMP
The Constant TEST_RUN_TIMESTAMP.- See Also:
- Constant Field Values
-
TEST_RUN_TIMESTAMP_ISO8601
protected static final java.lang.String TEST_RUN_TIMESTAMP_ISO8601
The Constant TEST_RUN_TIMESTAMP_ISO8601.- See Also:
- Constant Field Values
-
TEST_RUN_DURATION
protected static final java.lang.String TEST_RUN_DURATION
The Constant TEST_RUN_DURATION.- See Also:
- Constant Field Values
-
TEST_RUN_ABORT_MESSAGE_ATTRIBUTE
protected static final java.lang.String TEST_RUN_ABORT_MESSAGE_ATTRIBUTE
The Constant TEST_RUN_ABORT_MESSAGE_ATTRIBUTE.- See Also:
- Constant Field Values
-
VARIANT_ELEMENT
protected static final java.lang.String VARIANT_ELEMENT
The Constant VARIANT_ELEMENT.- See Also:
- Constant Field Values
-
VARIANT_NAME_ATTRIBUTE
protected static final java.lang.String VARIANT_NAME_ATTRIBUTE
The Constant VARIANT_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
VARIANT_DESCRIPTION_ATTRIBUTE
protected static final java.lang.String VARIANT_DESCRIPTION_ATTRIBUTE
The Constant VARIANT_DESCRIPTION_ATTRIBUTE.- See Also:
- Constant Field Values
-
SUITE_ELEMENT
protected static final java.lang.String SUITE_ELEMENT
The Constant SUITE_ELEMENT.- See Also:
- Constant Field Values
-
SUITE_NAME_ATTRIBUTE
protected static final java.lang.String SUITE_NAME_ATTRIBUTE
The Constant SUITE_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
SUITE_TITLE_ATTRIBUTE
protected static final java.lang.String SUITE_TITLE_ATTRIBUTE
The Constant SUITE_TITLE_ATTRIBUTE.- See Also:
- Constant Field Values
-
SUITE_DISPLAY_ATTRIBUTE
protected static final java.lang.String SUITE_DISPLAY_ATTRIBUTE
The Constant SUITE_DISPLAY_ATTRIBUTE.- See Also:
- Constant Field Values
-
SUITE_DISPLAY_VALUE_INLINE
protected static final java.lang.String SUITE_DISPLAY_VALUE_INLINE
The Constant SUITE_DISPLAY_VALUE_INLINE.- See Also:
- Constant Field Values
-
VARIABLE_DEFINITION_COLLECTION_ELEMENT
protected static final java.lang.String VARIABLE_DEFINITION_COLLECTION_ELEMENT
The Constant VARIABLE_DEFINITION_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
RETURN_VARIABLE_ASSIGNMENT_COLLECTION_ELEMENT
protected static final java.lang.String RETURN_VARIABLE_ASSIGNMENT_COLLECTION_ELEMENT
The Constant RETURN_VARIABLE_ASSIGNMENT_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
STATEMENT_COLLECTION_ELEMENT
protected static final java.lang.String STATEMENT_COLLECTION_ELEMENT
The Constant STATEMENT_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
SETUP_COLLECTION_ELEMENT
protected static final java.lang.String SETUP_COLLECTION_ELEMENT
The Constant SETUP_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
TEARDOWN_COLLECTION_ELEMENT
protected static final java.lang.String TEARDOWN_COLLECTION_ELEMENT
The Constant TEARDOWN_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
TEST_ELEMENT
protected static final java.lang.String TEST_ELEMENT
The Constant TEST_ELEMENT.- See Also:
- Constant Field Values
-
TABLETEST_ELEMENT
protected static final java.lang.String TABLETEST_ELEMENT
The Constant TABLETEST_ELEMENT.- See Also:
- Constant Field Values
-
CALL_ELEMENT
protected static final java.lang.String CALL_ELEMENT
The Constant CALL_ELEMENT.- See Also:
- Constant Field Values
-
RESULT_ELEMENT
protected static final java.lang.String RESULT_ELEMENT
The Constant RESULT_ELEMENT.- See Also:
- Constant Field Values
-
RESULT_COLLECTION_ELEMENT
protected static final java.lang.String RESULT_COLLECTION_ELEMENT
The Constant RESULT_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
FINALIZATION_TEST_RESULT_ELEMENT
protected static final java.lang.String FINALIZATION_TEST_RESULT_ELEMENT
The Constant POST_INVOCATION_RESULT_ELEMENT.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_ELEMENT_TITLE_ATTRIBUTE
protected static final java.lang.String EXTENDED_RESULT_ELEMENT_TITLE_ATTRIBUTE
The Constant EXTENDED_RESULT_ELEMENT_TYPE_ATTRIBUTE.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_TEXT_ELEMENT
protected static final java.lang.String EXTENDED_RESULT_TEXT_ELEMENT
The Constant EXTENDED_RESULT_TEXT_ELEMENT.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_IMAGE_ELEMENT
protected static final java.lang.String EXTENDED_RESULT_IMAGE_ELEMENT
The Constant EXTENDED_RESULT_IMAGE_ELEMENT.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_HTML_ELEMENT
protected static final java.lang.String EXTENDED_RESULT_HTML_ELEMENT
The Constant EXTENDED_RESULT_HTML_ELEMENT.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_IMAGE_ELEMENT_TYPE_ATTRIBUTE
protected static final java.lang.String EXTENDED_RESULT_IMAGE_ELEMENT_TYPE_ATTRIBUTE
The Constant EXTENDED_RESULT_IMAGE_ELEMENT_TYPE_ATTRIBUTE.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_IMAGE_ELEMENT_WIDTH_ATTRIBUTE
protected static final java.lang.String EXTENDED_RESULT_IMAGE_ELEMENT_WIDTH_ATTRIBUTE
The Constant EXTENDED_RESULT_IMAGE_ELEMENT_WIDTH_ATTRIBUTE.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_IMAGE_ELEMENT_HEIGHT_ATTRIBUTE
protected static final java.lang.String EXTENDED_RESULT_IMAGE_ELEMENT_HEIGHT_ATTRIBUTE
The Constant EXTENDED_RESULT_IMAGE_ELEMENT_HEIGHT_ATTRIBUTE.- See Also:
- Constant Field Values
-
EXTENDED_RESULT_COLLECTION_ELEMENT
protected static final java.lang.String EXTENDED_RESULT_COLLECTION_ELEMENT
The Constant EXTENDED_RESULT_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
VARIABLE_UPDATE_ELEMENT
protected static final java.lang.String VARIABLE_UPDATE_ELEMENT
The Constant VARIABLE_UPDATE_ELEMENT.- See Also:
- Constant Field Values
-
VARIABLE_UPDATE_PARAMETER_NAME_ATTRIBUTE
protected static final java.lang.String VARIABLE_UPDATE_PARAMETER_NAME_ATTRIBUTE
The Constant VARIABLE_UPDATE_PARAMETER_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
COMPARISON_ELEMENT
protected static final java.lang.String COMPARISON_ELEMENT
The Constant COMPARISON_ELEMENT.- See Also:
- Constant Field Values
-
COMPARISON_COLLECTION_ELEMENT
protected static final java.lang.String COMPARISON_COLLECTION_ELEMENT
The Constant COMPARISON_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
COMPARISON_NAME_ATTRIBUTE
protected static final java.lang.String COMPARISON_NAME_ATTRIBUTE
The Constant COMPARISON_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
VARIABLE_NAME_ATTRIBUTE
protected static final java.lang.String VARIABLE_NAME_ATTRIBUTE
The Constant VARIABLE_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
VARIABLE_TARGET_ATTRIBUTE
protected static final java.lang.String VARIABLE_TARGET_ATTRIBUTE
The Constant VARIABLE_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
VARIABLE_ELEMENT
protected static final java.lang.String VARIABLE_ELEMENT
The Constant VARIABLE_ELEMENT.- See Also:
- Constant Field Values
-
VARIABLE_ASSIGNMENT_ELEMENT
protected static final java.lang.String VARIABLE_ASSIGNMENT_ELEMENT
The Constant VARIABLE_ASSIGNMENT_ELEMENT.- See Also:
- Constant Field Values
-
TIME_SET_ELEMENT
protected static final java.lang.String TIME_SET_ELEMENT
The Constant TIME_SET_ELEMENT.- See Also:
- Constant Field Values
-
TIME_SET_TIMES_COLLECTION_ELEMENT
protected static final java.lang.String TIME_SET_TIMES_COLLECTION_ELEMENT
The Constant TIME_SET_TIMES_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
TIME_SET_TIMES_ELEMENT
protected static final java.lang.String TIME_SET_TIMES_ELEMENT
The Constant TIME_SET_TIMES_ELEMENT.- See Also:
- Constant Field Values
-
TIME_SET_TIMES_ELEMENT_FORK_ATTRIBUTE
protected static final java.lang.String TIME_SET_TIMES_ELEMENT_FORK_ATTRIBUTE
The Constant TIME_SET_TIMES_ELEMENT_FORK_ATTRIBUTE.- See Also:
- Constant Field Values
-
TIME_START_ATTRIBUTE
protected static final java.lang.String TIME_START_ATTRIBUTE
The Constant TIME_START_ATTRIBUTE.- See Also:
- Constant Field Values
-
TIME_PROGRESSION_FACTOR_ATTRIBUTE
protected static final java.lang.String TIME_PROGRESSION_FACTOR_ATTRIBUTE
The Constant TIME_PROGRESSION_FACTOR_ATTRIBUTE.- See Also:
- Constant Field Values
-
TIME_FORK_ATTRIBUTE
protected static final java.lang.String TIME_FORK_ATTRIBUTE
The Constant TIME_FORK_ATTRIBUTE.- See Also:
- Constant Field Values
-
TIME_TEXT_ATTRIBUTE
protected static final java.lang.String TIME_TEXT_ATTRIBUTE
The Constant TIME_TEXT_ATTRIBUTE.- See Also:
- Constant Field Values
-
COMMENT_ELEMENT
protected static final java.lang.String COMMENT_ELEMENT
The Constant COMMENT_ELEMENT.- See Also:
- Constant Field Values
-
COMMENT_TEXT_ATTRIBUTE
protected static final java.lang.String COMMENT_TEXT_ATTRIBUTE
The Constant COMMENT_TEXT_ATTRIBUTE.- See Also:
- Constant Field Values
-
COMMENT_TYPE_ATTRIBUTE
protected static final java.lang.String COMMENT_TYPE_ATTRIBUTE
The Constant COMMENT_TYPE_ATTRIBUTE.- See Also:
- Constant Field Values
-
COMMENT_TYPE_SUITETITLE
protected static final java.lang.String COMMENT_TYPE_SUITETITLE
The Constant COMMENT_TYPE_SUITETITLE.- See Also:
- Constant Field Values
-
COMMENT_TYPE_TITLE
protected static final java.lang.String COMMENT_TYPE_TITLE
The Constant COMMENT_TYPE_TITLE.- See Also:
- Constant Field Values
-
DIVIDER_ELEMENT
protected static final java.lang.String DIVIDER_ELEMENT
The Constant DIVIDER_ELEMENT.- See Also:
- Constant Field Values
-
DIVIDER_TEXT_ATTRIBUTE
protected static final java.lang.String DIVIDER_TEXT_ATTRIBUTE
The Constant DIVIDER_TEXT_ATTRIBUTE.- See Also:
- Constant Field Values
-
PARAMETER_COLLECTION_ELEMENT
protected static final java.lang.String PARAMETER_COLLECTION_ELEMENT
The Constant PARAMETER_COLLECTION_ELEMENT.- See Also:
- Constant Field Values
-
PARAMETER_ELEMENT
protected static final java.lang.String PARAMETER_ELEMENT
The Constant PARAMETER_ELEMENT.- See Also:
- Constant Field Values
-
PARAMETER_NAME_ATTRIBUTE
protected static final java.lang.String PARAMETER_NAME_ATTRIBUTE
The Constant PARAMETER_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
PARAMETER_VALUE_ATTRIBUTE
protected static final java.lang.String PARAMETER_VALUE_ATTRIBUTE
The Constant PARAMETER_VALUE_ATTRIBUTE.- See Also:
- Constant Field Values
-
VARIABLE_VALUE_ATTRIBUTE
protected static final java.lang.String VARIABLE_VALUE_ATTRIBUTE
The Constant VARIABLE_VALUE_ATTRIBUTE.- See Also:
- Constant Field Values
-
RESULT_EXPECTED_VALUE_ATTRIBUTE
protected static final java.lang.String RESULT_EXPECTED_VALUE_ATTRIBUTE
The Constant RESULT_EXPECTED_VALUE_ATTRIBUTE.- See Also:
- Constant Field Values
-
RESULT_REAL_VALUE_ATTRIBUTE
protected static final java.lang.String RESULT_REAL_VALUE_ATTRIBUTE
The Constant RESULT_REAL_VALUE_ATTRIBUTE.- See Also:
- Constant Field Values
-
RESULT_TYPE_ATTRIBUTE
protected static final java.lang.String RESULT_TYPE_ATTRIBUTE
The Constant RESULT_TYPE_ATTRIBUTE.- See Also:
- Constant Field Values
-
RESULT_TYPE_SUCCESS
protected static final java.lang.String RESULT_TYPE_SUCCESS
The Constant RESULT_TYPE_SUCCESS.- See Also:
- Constant Field Values
-
RESULT_TYPE_FAILURE
protected static final java.lang.String RESULT_TYPE_FAILURE
The Constant RESULT_TYPE_FAILURE.- See Also:
- Constant Field Values
-
RESULT_TYPE_EXCEPTION
protected static final java.lang.String RESULT_TYPE_EXCEPTION
The Constant RESULT_TYPE_EXCEPTION.- See Also:
- Constant Field Values
-
RESULT_EXCEPTION_MESSAGE_ATTRIBUTE
protected static final java.lang.String RESULT_EXCEPTION_MESSAGE_ATTRIBUTE
The Constant RESULT_EXCEPTION_MESSAGE_ATTRIBUTE.- See Also:
- Constant Field Values
-
RESULT_EXCEPTION_TRACE_ATTRIBUTE
protected static final java.lang.String RESULT_EXCEPTION_TRACE_ATTRIBUTE
The Constant RESULT_EXCEPTION_TRACE_ATTRIBUTE.- See Also:
- Constant Field Values
-
EXECUTION_DURATION_ATTRIBUTE
protected static final java.lang.String EXECUTION_DURATION_ATTRIBUTE
The Constant EXECUTION_DURATION_ATTRIBUTE.- See Also:
- Constant Field Values
-
SUCCESS_COUNT_ATTRIBUTE
protected static final java.lang.String SUCCESS_COUNT_ATTRIBUTE
The Constant SUCCESS_COUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
FAILURE_COUNT_ATTRIBUTE
protected static final java.lang.String FAILURE_COUNT_ATTRIBUTE
The Constant FAILURE_COUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
EXCEPTION_COUNT_ATTRIBUTE
protected static final java.lang.String EXCEPTION_COUNT_ATTRIBUTE
The Constant EXCEPTION_COUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
TEST_EXCEPTION_COUNT_ATTRIBUTE
protected static final java.lang.String TEST_EXCEPTION_COUNT_ATTRIBUTE
The Constant TEST_EXCEPTION_COUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
CALL_EXCEPTION_COUNT_ATTRIBUTE
protected static final java.lang.String CALL_EXCEPTION_COUNT_ATTRIBUTE
The Constant CALL_EXCEPTION_COUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
FIXTURE_DESCRIPTION_ATTRIBUTE
protected static final java.lang.String FIXTURE_DESCRIPTION_ATTRIBUTE
The Constant FIXTURE_DESCRIPTION_ATTRIBUTE.- See Also:
- Constant Field Values
-
TEST_NAME_ELEMENT
protected static final java.lang.String TEST_NAME_ELEMENT
The Constant TEST_NAME_ELEMENT.- See Also:
- Constant Field Values
-
CALL_NAME_ELEMENT
protected static final java.lang.String CALL_NAME_ELEMENT
The Constant CALL_NAME_ELEMENT.- See Also:
- Constant Field Values
-
FIXTURE_METHOD_ATTRIBUTE
protected static final java.lang.String FIXTURE_METHOD_ATTRIBUTE
The Constant FIXTURE_METHOD_ATTRIBUTE.- See Also:
- Constant Field Values
-
FORK_NAME_ATTRIBUTE
protected static final java.lang.String FORK_NAME_ATTRIBUTE
The Constant FORK_NAME_ATTRIBUTE.- See Also:
- Constant Field Values
-
FORK_DESCRIPTION_ATTRIBUTE
protected static final java.lang.String FORK_DESCRIPTION_ATTRIBUTE
The Constant FORK_DESCRIPTION_ATTRIBUTE.- See Also:
- Constant Field Values
-
ID_ATTRIBUTE
protected static final java.lang.String ID_ATTRIBUTE
The Constant ID_ATTRIBUTE.- See Also:
- Constant Field Values
-
LINE_NUMBER_ATTRIBUTE
protected static final java.lang.String LINE_NUMBER_ATTRIBUTE
The constant LINE_NUMBER_ATTRIBUTE.- See Also:
- Constant Field Values
-
VERSION_ATTRIBUTE
protected static final java.lang.String VERSION_ATTRIBUTE
The constant VERSION_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_ELEMENT
protected static final java.lang.String CONSOLE_ELEMENT
The Constant CONSOLE_ELEMENT.- See Also:
- Constant Field Values
-
CONSOLE_LINECOUNT_ATTRIBUTE
protected static final java.lang.String CONSOLE_LINECOUNT_ATTRIBUTE
The Constant CONSOLE_LINECOUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_TRUNCATED_ATTRIBUTE
protected static final java.lang.String CONSOLE_TRUNCATED_ATTRIBUTE
The Constant CONSOLE_TRUNCATED_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_TEMP_STARTTIME_ATTRIBUTE
protected static final java.lang.String CONSOLE_TEMP_STARTTIME_ATTRIBUTE
The Constant CONSOLE_TEMP_STARTTIME_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_TEMP_ENDTIME_ATTRIBUTE
protected static final java.lang.String CONSOLE_TEMP_ENDTIME_ATTRIBUTE
The Constant CONSOLE_TEMP_ENDTIME_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_LINE_STDOUT_ELEMENT
protected static final java.lang.String CONSOLE_LINE_STDOUT_ELEMENT
The Constant CONSOLE_LINE_STDOUT_ELEMENT.- See Also:
- Constant Field Values
-
CONSOLE_LINE_STDERR_ELEMENT
protected static final java.lang.String CONSOLE_LINE_STDERR_ELEMENT
The Constant CONSOLE_LINE_STDERR_ELEMENT.- See Also:
- Constant Field Values
-
CONSOLE_LINE_TEXT_ATTRIBUTE
protected static final java.lang.String CONSOLE_LINE_TEXT_ATTRIBUTE
The Constant CONSOLE_LINE_TEXT_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_LINE_TIME_ATTRIBUTE
protected static final java.lang.String CONSOLE_LINE_TIME_ATTRIBUTE
The Constant CONSOLE_LINE_TEMP_TIME_ATTRIBUTE.- See Also:
- Constant Field Values
-
CONSOLE_LINE_SOURCE_ATTRIBUTE
protected static final java.lang.String CONSOLE_LINE_SOURCE_ATTRIBUTE
The Constant CONSOLE_LINE_SOURCE_ATTRIBUTE.- See Also:
- Constant Field Values
-
FIXTURELOG_ELEMENT
protected static final java.lang.String FIXTURELOG_ELEMENT
The Constant FIXTURELOG_ELEMENT.- See Also:
- Constant Field Values
-
FIXTURELOG_LINECOUNT_ATTRIBUTE
protected static final java.lang.String FIXTURELOG_LINECOUNT_ATTRIBUTE
The Constant FIXTURELOG_LINECOUNT_ATTRIBUTE.- See Also:
- Constant Field Values
-
FIXTURELOG_LINE_ELEMENT
protected static final java.lang.String FIXTURELOG_LINE_ELEMENT
The Constant FIXTURELOG_LINE_ELEMENT.- See Also:
- Constant Field Values
-
FIXTURELOG_LINE_TEXT_ATTRIBUTE
protected static final java.lang.String FIXTURELOG_LINE_TEXT_ATTRIBUTE
The Constant FIXTURELOG_LINE_TEXT_ATTRIBUTE.- See Also:
- Constant Field Values
-
FIXTURELOG_LINE_TIME_ATTRIBUTE
protected static final java.lang.String FIXTURELOG_LINE_TIME_ATTRIBUTE
The Constant FIXTURELOG_LINE_TIME_ATTRIBUTE.- See Also:
- Constant Field Values
-
SYSPARAM_MAX_CONSOLE_LINES
protected static final java.lang.String SYSPARAM_MAX_CONSOLE_LINES
System property name to override max console lines.- See Also:
- Constant Field Values
-
DEFAULT_MAX_CONSOLE_LINES
protected static final int DEFAULT_MAX_CONSOLE_LINES
Default maximum number of lines of console output that is added to a single test/call.- See Also:
- Constant Field Values
-
MAX_CONSOLE_LINES
protected static final int MAX_CONSOLE_LINES
Maximum number of lines of console output that is added to a single test/call.
-
SYSPARAM_MAX_CONSOLE_LINE_SIZE
protected static final java.lang.String SYSPARAM_MAX_CONSOLE_LINE_SIZE
System property name to override max console line size.- See Also:
- Constant Field Values
-
DEFAULT_MAX_CONSOLE_LINE_SIZE
protected static final int DEFAULT_MAX_CONSOLE_LINE_SIZE
Maximum size of a single console line default.- See Also:
- Constant Field Values
-
MAX_CONSOLE_LINE_SIZE
protected static final int MAX_CONSOLE_LINE_SIZE
Maximum size of a single console line.
-
SYSPARAM_MAX_FORMATTED_STRING_SIZE
protected static final java.lang.String SYSPARAM_MAX_FORMATTED_STRING_SIZE
System property name to override max formatted string size.- See Also:
- Constant Field Values
-
DEFAULT_MAX_FORMATTED_STRING_SIZE
protected static final int DEFAULT_MAX_FORMATTED_STRING_SIZE
Default max formatted string size.- See Also:
- Constant Field Values
-
MAX_FORMATTED_STRING_SIZE
protected static final int MAX_FORMATTED_STRING_SIZE
The maximum length of serializedFormattedString
s in Unicode code units. If these get overly long, they impose a very hefty CPU load on the XSLT transformer, which must convert them to HTML markup. Hence extremely long formatted strings are just returned in the result as "normal" strings, which still carry all the data, but just don't format as nicely in the result.
-
TRANSFORM_THREAD_STACK_SIZE_DEFAULT
protected static final int TRANSFORM_THREAD_STACK_SIZE_DEFAULT
Default stack size for the XSLT transform thread.- See Also:
- Constant Field Values
-
SYSPARAM_TRANSFORM_THREAD_STACK_SIZE
protected static final java.lang.String SYSPARAM_TRANSFORM_THREAD_STACK_SIZE
System property name for overriding transform thread stack size.- See Also:
- Constant Field Values
-
EXECUTION_TIME_FORMAT
protected static final java.text.DecimalFormat EXECUTION_TIME_FORMAT
The time format used to format execution times.
-
DATE_FORMAT
protected static final java.text.DateFormat DATE_FORMAT
The generally used date format (coarse-grained date/time).
-
TIMESTAMP_FORMAT
protected static final java.text.DateFormat TIMESTAMP_FORMAT
The generally used timestamp format (fine-grained date/time).
-
ISO_DATE_FORMAT
protected static final java.text.SimpleDateFormat ISO_DATE_FORMAT
The ISO-standardized date format (this is mostly added to the XML to allow for easy transformation into a JUnit-compatible result XML.
-
SYSPARAM_ENABLE_TRACE_OUTPUT
protected static final java.lang.String SYSPARAM_ENABLE_TRACE_OUTPUT
System property name to enable XML Writer Stack Trace output.- See Also:
- Constant Field Values
-
isTracingEnabled
protected boolean isTracingEnabled
Whether stack tracing is enabled. See thestackPeek()
,stackPop()
andstackPush(Element)
method for details.
-
SYSPARAM_XSLT_RESOURCE
protected static final java.lang.String SYSPARAM_XSLT_RESOURCE
System property name to override XSLT resource.- See Also:
- Constant Field Values
-
XSLT_RESOURCE_NAME
protected static final java.lang.String XSLT_RESOURCE_NAME
The name of the XSLT script resource.
-
XSLT_TRANSFORMER_FACTORY_PROPERTY
protected static final java.lang.String XSLT_TRANSFORMER_FACTORY_PROPERTY
The XSLT transformer factory property.- See Also:
- Constant Field Values
-
URL_PATTERN
protected static final java.util.regex.Pattern URL_PATTERN
The pattern for URL detection.
-
MARKDOWN_URL_PATTERN
protected static final java.util.regex.Pattern MARKDOWN_URL_PATTERN
The pattern for Markdown-style URL detection.
-
-
Constructor Detail
-
XmlWriterTestCallback
public XmlWriterTestCallback(java.lang.ClassLoader aClassLoader, java.io.File anOutputFile, java.lang.String aTitle, TransformHandling aTransformHandling, boolean aCaptureConsoleFlag)
Creates a new instance.- Parameters:
aClassLoader
- the classloader to useanOutputFile
- the file to write the result intoaTitle
- the title of the resultaTransformHandling
- how the XML -> XHTML transform shall be handledaCaptureConsoleFlag
- whether stdout and stderr shall be captured
-
-
Method Detail
-
getXsltStream
protected java.io.InputStream getXsltStream()
Gets the xslt stream.- Returns:
- the xslt stream
-
onExecutionStart
public void onExecutionStart(TestModel aModel, VariantDefinition aVariant)
On execution start.- Specified by:
onExecutionStart
in classTestRunnerCallback
- Parameters:
aModel
- the a modelaVariant
- the a variant
-
onSuiteStart
public void onSuiteStart(Suite aSuite)
On suite start.- Specified by:
onSuiteStart
in classTestRunnerCallback
- Parameters:
aSuite
- the a suite
-
internalOnSuiteStart
protected void internalOnSuiteStart(org.jdom.Element aSuiteElement)
Internal version ofonSuiteStart(Suite)
.- Parameters:
aSuiteElement
- the a suite element
-
onSetupStart
public void onSetupStart(SuiteDefinition aSetupSuite)
On setup start.- Specified by:
onSetupStart
in classTestRunnerCallback
- Parameters:
aSetupSuite
- the a setup suite
-
internalOnSetupStart
protected void internalOnSetupStart(org.jdom.Element aSetupElement)
Internal version ofonSetupStart(SuiteDefinition)
.- Parameters:
aSetupElement
- the a setup element
-
onSetupFinish
public void onSetupFinish(SuiteDefinition aSetupSuite, SuiteResult aResult)
On setup finish.- Specified by:
onSetupFinish
in classTestRunnerCallback
- Parameters:
aSetupSuite
- the a setup suiteaResult
- the a result
-
addSuiteSummaryResultToElement
protected void addSuiteSummaryResultToElement(org.jdom.Element anElement, SuiteSummaryResult aResult)
Adds the given suite summary result totals to the given result element as attributes.- Parameters:
anElement
- the XML elementaResult
- the result object
-
internalOnSetupFinish
protected void internalOnSetupFinish(org.jdom.Element aSuiteResultElement)
Internal version ofonSetupFinish(SuiteDefinition, SuiteResult)
.- Parameters:
aSuiteResultElement
- the a suite result element
-
onTestStart
public void onTestStart(Test aTest)
On test start.- Specified by:
onTestStart
in classTestRunnerCallback
- Parameters:
aTest
- the a test
-
internalOnTestStart
protected void internalOnTestStart(org.jdom.Element aTestElement)
Internal version ofonTestStart(Test)
.- Parameters:
aTestElement
- the a test element
-
onTableTestStart
public void onTableTestStart(TableTest aTest)
On table test start.- Specified by:
onTableTestStart
in classTestRunnerCallback
- Parameters:
aTest
- the a test
-
internalOnTableTestStart
protected void internalOnTableTestStart(org.jdom.Element aTestElement, org.jdom.Element aResultCollectionElement)
Internal version ofonTableTestStart(TableTest)
.- Parameters:
aTestElement
- the a test element
-
onTestFinish
public void onTestFinish(Test aTest, TestResult aResult)
On test finish.- Specified by:
onTestFinish
in classTestRunnerCallback
- Parameters:
aTest
- the a testaResult
- the a result
-
internalOnTestFinish
protected void internalOnTestFinish(org.jdom.Element aResultCollectionElement, org.jdom.Element anExtendedResultElement)
Internal version ofonTestFinish(Test, TestResult)
.- Parameters:
aResultCollectionElement
- the a result collection element
-
createExtendedResultElement
protected org.jdom.Element createExtendedResultElement(java.util.List<ExtendedResultFixture.ExtendedResult> someExtendedResults)
Creates an extended result element.- Parameters:
someExtendedResults
- the results to add
-
onTableTestRowStart
public void onTableTestRowStart(TableTest aTableTest, TableTestRow aRow)
On table test row start.- Specified by:
onTableTestRowStart
in classTestRunnerCallback
- Parameters:
aTableTest
- the a table testaRow
- the a row
-
onTableTestRowFinish
public void onTableTestRowFinish(TableTest aTableTest, TableTestRow aRow, TestSubResult aSubResult)
On table test row finish.- Specified by:
onTableTestRowFinish
in classTestRunnerCallback
- Parameters:
aTableTest
- the a table testaRow
- the a rowaSubResult
- the a sub result
-
onTableTestFinish
public void onTableTestFinish(TableTest aTableTest, TestResult aResult)
On table test finish.- Specified by:
onTableTestFinish
in classTestRunnerCallback
- Parameters:
aTableTest
- the a table testaResult
- the a result
-
internalOnTableTestFinish
protected void internalOnTableTestFinish(org.jdom.Element aResultCollectionElement, org.jdom.Element anExtendedResultElement, org.jdom.Element aPostInvocationResultElement)
Internal version ofonTableTestFinish(TableTest, TestResult)
.- Parameters:
aResultCollectionElement
- the a result collection elementanExtendedResultElement
- the extended result element
-
onAnyKindOfSubTestFinish
protected void onAnyKindOfSubTestFinish(MethodReference aMethod, SuiteStatementWithResult aStatement, org.jdom.Element aResultCollectionElement, TestSubResult aSubResult, java.util.Map<java.lang.String,java.lang.Object> aParameterMapForText, java.util.Map<java.lang.String,java.lang.Object> aParameterMap)
Used to write sub-test results.- Parameters:
aMethod
- the method executedaStatement
- the statement currently being executedaResultCollectionElement
- the result elementaSubResult
- the sub-result to writeaParameterMapForText
- the parameters to be used for text string generationaParameterMap
- the parameters
-
onCallStart
public void onCallStart(Call aCall)
On call start.- Specified by:
onCallStart
in classTestRunnerCallback
- Parameters:
aCall
- the a call
-
internalOnCallStart
protected void internalOnCallStart(org.jdom.Element aCallElement)
Internal version ofonCallStart(Call)
.- Parameters:
aCallElement
- the a call element
-
onCallFinish
public void onCallFinish(Call aCall, CallResult aResult)
On call finish.- Specified by:
onCallFinish
in classTestRunnerCallback
- Parameters:
aCall
- the a callaResult
- the a result
-
internalOnCallFinish
protected void internalOnCallFinish(org.jdom.Element aCallResultElement, org.jdom.Element anExtendedResultElement)
Internal version ofonCallFinish(Call, CallResult)
.- Parameters:
aCallResultElement
- the a call result elementanExtendedResultElement
- the extended result element
-
onTearDownStart
public void onTearDownStart(SuiteDefinition aTearDownSuite)
On tear down start.- Specified by:
onTearDownStart
in classTestRunnerCallback
- Parameters:
aTearDownSuite
- the a tear down suite
-
internalOnTearDownStart
protected void internalOnTearDownStart(org.jdom.Element aTearDownElement)
Internal version ofonTearDownStart(SuiteDefinition)
.- Parameters:
aTearDownElement
- the a tear down element
-
onTearDownFinish
public void onTearDownFinish(SuiteDefinition aTearDownSuite, SuiteResult aResult)
On tear down finish.- Specified by:
onTearDownFinish
in classTestRunnerCallback
- Parameters:
aTearDownSuite
- the a tear down suiteaResult
- the a result
-
internalOnTearDownFinish
protected void internalOnTearDownFinish(org.jdom.Element aSuiteResultElement)
Internal version ofonTearDownFinish(SuiteDefinition, SuiteResult)
.- Parameters:
aSuiteResultElement
- the a suite result element
-
onSuiteFinish
public void onSuiteFinish(Suite aSuite, SuiteSummaryResult aResult)
On suite finish.- Specified by:
onSuiteFinish
in classTestRunnerCallback
- Parameters:
aSuite
- the a suiteaResult
- the a result
-
internalOnSuiteFinish
protected void internalOnSuiteFinish(org.jdom.Element aSuiteResultElement)
Internal version of#onSuiteFinish(Suite, SuiteResult)
.- Parameters:
aSuiteResultElement
- the a suite result element
-
onExecutionFinish
public void onExecutionFinish(TestModel aModel, SuiteSummaryResult aResult)
On execution finish.- Specified by:
onExecutionFinish
in classTestRunnerCallback
- Parameters:
aModel
- the a modelaResult
- the a result
-
determineTransformThreadStackSize
protected int determineTransformThreadStackSize()
Determines the stack size used for the XSLT transform thread. XSLT transformation can require large stack sizes, since XSLT is a functional language and relies heavily on recursion.- Returns:
-
transformResult
protected void transformResult(java.io.FileOutputStream aTargetStream)
Performs the XSLT transformation and writes the result HTML file into the provided target stream.- Parameters:
aTargetStream
- the target stream
-
onVariableDefinition
public void onVariableDefinition(VariableEntity aDefinition, SuiteDefinition aSuite, java.lang.Object anInitialValue)
On variable definition.- Specified by:
onVariableDefinition
in classTestRunnerCallback
- Parameters:
aDefinition
- the a definitionaSuite
- the a suiteanInitialValue
- the an initial value
-
onConstantDefinition
public void onConstantDefinition(ConstantEntity aDefinition, SuiteDefinition aSuite, java.lang.Object aValue, boolean aParameterizedFlag)
On constant definition.- Specified by:
onConstantDefinition
in classTestRunnerCallback
- Parameters:
aDefinition
- the a definitionaSuite
- the a suiteaValue
- the a valueaParameterizedFlag
- the a parameterized flag
-
onVariableAssignment
public void onVariableAssignment(VariableAssignment anAssignment, VariableEntity aDefinition, SuiteDefinition aSuite, java.lang.Object aValue)
Description copied from class:TestRunnerCallback
Called when a variable is being assigned.- Specified by:
onVariableAssignment
in classTestRunnerCallback
- Parameters:
anAssignment
- the assignmentaDefinition
- the variable that the value is to be assignedaSuite
- the suite in which the variable is scoped (may be null if the variable is global)aValue
- the value
-
internalOnVariableAssignment
protected void internalOnVariableAssignment(org.jdom.Element aVariableAssignmentElement)
Internal version of#onVariableAssignment(VariableEntity, SuiteDefinition, Object)
.- Parameters:
aVariableAssignmentElement
- the variable element
-
onReturnVariableAssignment
public void onReturnVariableAssignment(SuiteReturn aReturn, VariableEntity aSource, VariableEntity aTarget, Suite aSuite, java.lang.Object aValue)
Description copied from class:TestRunnerCallback
Called when a return variable value from a suite is assigned to the respective local variable in the calling suite.- Specified by:
onReturnVariableAssignment
in classTestRunnerCallback
- Parameters:
aReturn
- the return variable objectaSource
- the source variable entityaTarget
- the target variable entityaSuite
- the suite invocation for which the assignment is doneaValue
- the value to be assigned
-
onTimeSetStart
public void onTimeSetStart(TimeSet aTimeSet, SuiteDefinition aSuite, java.util.List<ForkDefinition> someForks)
Description copied from class:TestRunnerCallback
Called when the test time will be set.- Specified by:
onTimeSetStart
in classTestRunnerCallback
- Parameters:
aTimeSet
- the time to be setaSuite
- the suite in which the time was setsomeForks
- the forks on which the time was set (the null element in the list means the master process)
-
onTimeSetFinish
public void onTimeSetFinish(TimeSet aTimeSet, TimeSetResult aResult)
Description copied from class:TestRunnerCallback
Called when the test time was set.- Specified by:
onTimeSetFinish
in classTestRunnerCallback
- Parameters:
aTimeSet
- the time to be setaResult
- the result of the operation
-
internalOnTimeSetStart
protected void internalOnTimeSetStart(org.jdom.Element aTimeSetElement)
Internal version ofonTimeSetStart(TimeSet, SuiteDefinition, List)
.- Parameters:
aTimeSetElement
- the element
-
internalOnTimeSetFinish
protected void internalOnTimeSetFinish(org.jdom.Element aTimeSetElement)
Internal version of#onTimeSetFinish(TimeSet, SuiteDefinition, List, String, String)
.- Parameters:
aTimeSetElement
- the element
-
internalOnReturnVariableAssignment
protected void internalOnReturnVariableAssignment(org.jdom.Element aReturnAssignmentElement)
Internal version of#onReturnVariableAssignment(SuiteReturn, Suite, Object)
.- Parameters:
aReturnAssignmentElement
- the element
-
onAbortExecution
public void onAbortExecution(java.lang.String anAbortExecutionMessage, java.lang.String anAbortExecutionStackTrace)
Description copied from class:TestRunnerCallback
Called when test execution is aborted prematurely due to anAbortExecutionException
- either thrown locally or by a fork. The original exception can't be provided since it cannot be received from a fork by remoting. Instead, the data from the exception is provided in both cases.- Specified by:
onAbortExecution
in classTestRunnerCallback
- Parameters:
anAbortExecutionMessage
- the message from the exceptionanAbortExecutionStackTrace
- the stack trace of the exception
-
internalOnVariableDefinition
protected void internalOnVariableDefinition(org.jdom.Element aVariableElement, boolean aGlobalFlag)
Internal version ofonVariableDefinition(VariableEntity, SuiteDefinition, Object)
.- Parameters:
aVariableElement
- the a variable element
-
parseComment
protected java.util.List<org.jdom.Content> parseComment(java.lang.String aCommment)
Parses a comment into a list ofContent
elements. This takes care of URLs embedded in the comment.- Parameters:
aCommment
- the a commment- Returns:
- the list
-
detectSimpleURLs
protected java.util.List<org.jdom.Content> detectSimpleURLs(java.lang.String aText)
Finds simple URLs in the given text and parses all into XML elements.- Parameters:
aText
- the text to parse- Returns:
- a list of XML elements, with the URLs converted to anchor tags
-
detectMarkdownURLs
protected java.util.List<org.jdom.Content> detectMarkdownURLs(java.lang.String aText)
Finds Markdown-style URLs in the given text and parses all into XML elements.- Parameters:
aText
- the text to parse- Returns:
- a list of XML elements, with the URLs converted to anchor tags
-
onVisibleComment
public void onVisibleComment(java.lang.String aCommentText, boolean anIsTitle, VisibleComment aCommentElement)
On visible comment.- Specified by:
onVisibleComment
in classTestRunnerCallback
- Parameters:
aCommentText
- the a comment textanIsTitle
- the an is titleaCommentElement
- the a comment element
-
onVisibleDivider
public void onVisibleDivider(java.lang.String aDividerText, VisibleDivider aDividerElement)
On visible divider.- Specified by:
onVisibleDivider
in classTestRunnerCallback
- Parameters:
aDividerText
- the a divider textaDividerElement
- the a divider element
-
internalOnVisibleComment
protected void internalOnVisibleComment(org.jdom.Element aCommentElement)
Internal version of#onVisibleComment(String)
.- Parameters:
aCommentElement
- the a comment element
-
internalOnVisibleDivider
protected void internalOnVisibleDivider(org.jdom.Element aDividerElement)
Internal version of#onVisibleDivider(String)
.- Parameters:
aDividerElement
- the divider element
-
stackTraceToString
protected static java.lang.String stackTraceToString(java.lang.Throwable anException)
Formats a stack trace into a single string with line-breaks.- Parameters:
anException
- the exception from which to get the stack trace- Returns:
- the stack trace as a string
-
nanoTimeToString
protected static java.lang.String nanoTimeToString(long aNanosecondValue)
Converts a nanosecond time value into a string, according toEXECUTION_TIME_FORMAT
.- Parameters:
aNanosecondValue
- the time- Returns:
- the formatted string
-
sendElementsToMaster
protected void sendElementsToMaster(TestRunnerCallbackMethods aMethod, org.jdom.Element... someElements)
Sends an XML element to the masterXmlWriterTestCallback
.- Parameters:
aMethod
- the method from which this is calledsomeElements
- the elements to send
-
onMessageFromFork
public void onMessageFromFork(TestRunnerCallbackMethods aMethod, java.io.Serializable... someObjects)
On message from fork.- Specified by:
onMessageFromFork
in classTestRunnerCallback
- Parameters:
aMethod
- the a methodsomeObjects
- the some objects
-
onCallbackProcessingStart
public void onCallbackProcessingStart()
On callback processing start.- Overrides:
onCallbackProcessingStart
in classTestRunnerCallback
-
onCallbackProcessingEnd
public void onCallbackProcessingEnd()
On callback processing end.- Overrides:
onCallbackProcessingEnd
in classTestRunnerCallback
-
addFixtureLogging
protected void addFixtureLogging(org.jdom.Element anElement)
Adds fixture log output to the provided element, if any is present. Can be called with "null" as an element, in which case theAggregatingFixtureLogger
s' internal buffer is just cleared. This buffer is of course also cleared if the method is used with an element.- Parameters:
anElement
- the element to add fixture logging to
-
processConsoleLogLine
protected java.lang.String processConsoleLogLine(java.lang.String aRawLine)
Truncates the given line and replaces certain characters (like tabs).- Parameters:
aRawLine
- the raw console log line- Returns:
- the line to be added to the test result
-
addId
protected void addId(org.jdom.Element anElement)
Adds the ID attribute to the element and increments the ID counter for the next element.- Parameters:
anElement
- the element to add an ID to
-
addVersion
protected void addVersion(org.jdom.Element anElement)
Adds the version number of the test runner bundle to the given element.- Parameters:
anElement
- the element to add the version to
-
addLineNumber
protected void addLineNumber(org.jdom.Element anElement, org.eclipse.emf.ecore.EObject anObject)
Adds the line number to the element where the givenEObject
starts.- Parameters:
anElement
- the element to add the numberanObject
- the object to find
-
addCurrentTime
protected void addCurrentTime(org.jdom.Element anElement)
Adds a timestamp based on the current time to the provided element.- Parameters:
anElement
- the element to add the timestamp to
-
stripTemporaryAttributes
protected void stripTemporaryAttributes(org.jdom.Element anElement)
Strips any temporary attributes (recognized by the prefixTEMPORARY_ATTRIBUTE_PREFIX
) from an element hierarchy.- Parameters:
anElement
- the an element
-
stackPop
protected org.jdom.Element stackPop()
Pops an element from the stack.- Returns:
- the element
-
stackPush
protected void stackPush(org.jdom.Element anElement)
Pushes an element on the stack.- Parameters:
anElement
- the an element
-
stackPeek
protected org.jdom.Element stackPeek()
Peeks onto the stack.- Returns:
- the element
-
getStringForElement
protected java.lang.String getStringForElement(org.jdom.Element anElement)
<<<<<<< HEAD ======= Converts the provided element into a string with the element name and all its attributes. This is for debug purposes only, NOT for writing actual XML content!- Parameters:
anElement
- the element to stringify- Returns:
- the string representation of the element
-
stackFind
protected org.jdom.Element stackFind(java.lang.String anElementName)
>>>>>>> v0.15.x_bugfix Finds a given element in the stack. The first (topmost) element is returned. The stack is not altered.- Parameters:
anElementName
- the name of the element to find- Returns:
- the element or null if none was found
-
onSuiteSkipped
public void onSuiteSkipped(Suite aSuite, SuiteSkipReason aReason)
Description copied from class:TestRunnerCallback
Called when a suite call is being skipped.- Specified by:
onSuiteSkipped
in classTestRunnerCallback
- Parameters:
aSuite
- the suite being skippedaReason
- the reason for the skipping
-
onSetupSkipped
public void onSetupSkipped(SuiteDefinition aSetupSuite, SuiteSkipReason aReason)
Description copied from class:TestRunnerCallback
Called when a setup suite is being skipped.- Specified by:
onSetupSkipped
in classTestRunnerCallback
- Parameters:
aSetupSuite
- the suite being skippedaReason
- the reason for the skipping
-
onTearDownSkipped
public void onTearDownSkipped(SuiteDefinition aTearDownSuite, SuiteSkipReason aReason)
Description copied from class:TestRunnerCallback
Called when a teardown suite is being skipped.- Specified by:
onTearDownSkipped
in classTestRunnerCallback
- Parameters:
aTearDownSuite
- the suite being skippedaReason
- the reason for the skipping
-
setAttributeGuarded
protected void setAttributeGuarded(org.jdom.Element anElement, java.lang.String anAttributeName, java.lang.String aValue)
Sets the given attribute to the given value in the element. In case of illegal values (containing chars that are illegal in XML) the illegal chars are replaced with question marks.- Parameters:
anElement
- the element to set the attribute onanAttributeName
- the attributes nameaValue
- the value to set
-
cleanXMLAttributeValue
protected java.lang.String cleanXMLAttributeValue(java.lang.String aValue)
Cleans a given attribute values from characters that are illegal in XML attributes.- Parameters:
aValue
- the string to clean up- Returns:
- the cleaned string
-
-