org.apache.jmeter.report.writers

Class AbstractReportWriter

Implemented Interfaces:
Cloneable, ReportWriter, Serializable, TestElement
Known Direct Subclasses:
HTMLReportWriter

public abstract class AbstractReportWriter
extends AbstractTestElement
implements ReportWriter

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

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

addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Field Details

TARGET_DIRECTORY

public static final String TARGET_DIRECTORY

Constructor Details

AbstractReportWriter

public AbstractReportWriter()

Method Details

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

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

makeDirectory

public void makeDirectory()

setTargetDirectory

public void setTargetDirectory(String directory)
Set the target directory where the report should be saved
Specified by:
setTargetDirectory in interface ReportWriter

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

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