Package org.apache.jmeter.save
Class SaveService
java.lang.Object
org.apache.jmeter.save.SaveService
Handles setting up XStream serialisation.
 The class reads alias definitions from saveservice.properties.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Stringstatic StringCEtoString(com.thoughtworks.xstream.converters.ConversionException ce) Simplify getMessage() output from XStream ConversionExceptionstatic Stringstatic StringgetFileEncoding(String dflt) Returns the file Encoding specified in saveservice.properties or the defaultstatic Stringstatic Stringstatic Objectstatic Propertiesstatic voidloadTestResults(InputStream reader, ResultCollectorHelper resultCollectorHelper) Read results from JTL file.static HashTreeLoad a Test tree (JMX file)static voidsaveElement(Object el, OutputStream out) static voidsaveSampleResult(SampleEvent evt, Writer writer) Save a sampleResult to an XML output file using XStream.static voidsaveTree(HashTree tree, OutputStream out) 
- 
Field Details- 
SAMPLE_EVENT_OBJECT- See Also:
 
- 
RESULTCOLLECTOR_HELPER_OBJECT- See Also:
 
- 
TEST_CLASS_NAME- See Also:
 
 
- 
- 
Constructor Details- 
SaveServicepublic SaveService()
 
- 
- 
Method Details- 
loadProperties- Throws:
- IOException
 
- 
aliasToClass
- 
classToAlias
- 
saveTree- Throws:
- IOException
 
- 
saveElement- Throws:
- IOException
 
- 
loadElement- Throws:
- IOException
 
- 
saveSampleResultSave a sampleResult to an XML output file using XStream.- Parameters:
- evt- sampleResult wrapped in a sampleEvent
- writer- output stream which must be created using- getFileEncoding(String)
- Throws:
- IOException- when writing data to output fails
 
- 
loadTestResultspublic static void loadTestResults(InputStream reader, ResultCollectorHelper resultCollectorHelper) throws IOException Read results from JTL file.- Parameters:
- reader- of the file
- resultCollectorHelper- helper class to enable TestResultWrapperConverter to deliver the samples
- Throws:
- IOException- if an I/O error occurs
 
- 
loadTreeLoad a Test tree (JMX file)- Parameters:
- file- the JMX file
- Returns:
- the loaded tree
- Throws:
- IOException- if there is a problem reading the file or processing it
 
- 
getFileEncodingReturns the file Encoding specified in saveservice.properties or the default- Parameters:
- dflt- value to return if file encoding was not provided
- Returns:
- file encoding or default
 
- 
CEtoStringSimplify getMessage() output from XStream ConversionException- Parameters:
- ce- - ConversionException to analyse
- Returns:
- string with details of error
 
- 
getPropertiesVersion
- 
getVERSION
 
-