com.canoo.webtest.reporting
Class XmlResultConverter

java.lang.Object
  extended by com.canoo.webtest.reporting.XmlResultConverter

public class XmlResultConverter
extends Object

The class converts a given StepResult into its XML representation. It is used to decouple report file handling (XmlReporter) and report content generation (this class).

Author:
Marc Guillemot

Field Summary
static String CONFIG_ELEMENT
           
static String ERROR_ELEMENT
           
static String FAILURE_ELEMENT
           
static String PARAMETER_ELEMENT
           
static String RESULTS_ELEMENT
           
static String ROOT_ELEMENT
           
static String STEP_COMPLETED_ELEMENT
           
static String STEP_ELEMENT
           
static String STEP_FAILED_ELEMENT
           
static String STEP_NOTEXECUTED_ELEMENT
           
static String STEP_RESULT_ATTRIBUTE
           
static String TESTRESULT_ELEMENT
           
 
Constructor Summary
XmlResultConverter(RootStepResult result)
           
 
Method Summary
 void addToDocument(Document doc)
          This method actually adds the XML representation of the test result to the provided XML document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_ELEMENT

public static final String ROOT_ELEMENT
See Also:
Constant Field Values

TESTRESULT_ELEMENT

public static final String TESTRESULT_ELEMENT
See Also:
Constant Field Values

RESULTS_ELEMENT

public static final String RESULTS_ELEMENT
See Also:
Constant Field Values

CONFIG_ELEMENT

public static final String CONFIG_ELEMENT
See Also:
Constant Field Values

PARAMETER_ELEMENT

public static final String PARAMETER_ELEMENT
See Also:
Constant Field Values

STEP_ELEMENT

public static final String STEP_ELEMENT
See Also:
Constant Field Values

FAILURE_ELEMENT

public static final String FAILURE_ELEMENT
See Also:
Constant Field Values

ERROR_ELEMENT

public static final String ERROR_ELEMENT
See Also:
Constant Field Values

STEP_RESULT_ATTRIBUTE

public static final String STEP_RESULT_ATTRIBUTE
See Also:
Constant Field Values

STEP_COMPLETED_ELEMENT

public static final String STEP_COMPLETED_ELEMENT
See Also:
Constant Field Values

STEP_FAILED_ELEMENT

public static final String STEP_FAILED_ELEMENT
See Also:
Constant Field Values

STEP_NOTEXECUTED_ELEMENT

public static final String STEP_NOTEXECUTED_ELEMENT
See Also:
Constant Field Values
Constructor Detail

XmlResultConverter

public XmlResultConverter(RootStepResult result)
Method Detail

addToDocument

public void addToDocument(Document doc)
                   throws ReportCreationException
This method actually adds the XML representation of the test result to the provided XML document. If the document is new (empty), it creates the required root element. Then it appends a new child to the root containing this result representation.

Parameters:
doc - An XML document into which the report for the current test result shall be added
Throws:
ReportCreationException - Signals an inconsistency in the XML document

Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.