Apache JMeter

org.apache.jmeter.report.writers
Class AbstractReportWriter

java.lang.Object
  extended by org.apache.jmeter.testelement.AbstractTestElement
      extended by org.apache.jmeter.report.writers.AbstractReportWriter
All Implemented Interfaces:
Serializable, Cloneable, Searchable, ReportWriter, TestElement
Direct Known Subclasses:
HTMLReportWriter

public abstract class AbstractReportWriter
extends AbstractTestElement
implements ReportWriter

The abstract report writer provides the common implementation for subclasses to reuse.

See Also:
Serialized Form

Field Summary
static String TARGET_DIRECTORY
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
AbstractReportWriter()
           
 
Method Summary
 void archiveDirectory()
          if the target output directory already exists, archive it
 String getDayString()
          return the day in YYYYMMDD format
 String getTargetDirectory()
          The method simply returns the target directory and doesn't validate it. the abstract class expects some other class will validate the target directory.
 void makeDirectory()
           
 void setTargetDirectory(String directory)
          Set the target directory where the report should be saved
abstract  ReportSummary writeReport(TestElement element)
          Subclasses need to implement this method and provide the necessary logic to produce a ReportSummary object and write the report
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TARGET_DIRECTORY

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

AbstractReportWriter

public AbstractReportWriter()
Method Detail

writeReport

public abstract ReportSummary writeReport(TestElement element)
Subclasses need to implement this method and provide the necessary logic to produce a ReportSummary object and write the report

Specified by:
writeReport in interface ReportWriter

getTargetDirectory

public String getTargetDirectory()
The method simply returns the target directory and doesn't validate it. the abstract class expects some other class will validate the target directory.

Specified by:
getTargetDirectory in interface ReportWriter

setTargetDirectory

public void setTargetDirectory(String directory)
Set the target directory where the report should be saved

Specified by:
setTargetDirectory in interface ReportWriter

makeDirectory

public void makeDirectory()

archiveDirectory

public void archiveDirectory()
if the target output directory already exists, archive it


getDayString

public String getDayString()
return the day in YYYYMMDD format

Returns:
the date

Apache JMeter

Copyright © 1998-2014 Apache Software Foundation. All Rights Reserved.