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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
CEtoString
(com.thoughtworks.xstream.converters.ConversionException ce) Simplify getMessage() output from XStream ConversionExceptionstatic String
static String
getFileEncoding
(String dflt) Returns the file Encoding specified in saveservice.properties or the defaultstatic String
static String
static Object
static Properties
static void
loadTestResults
(InputStream reader, ResultCollectorHelper resultCollectorHelper) Read results from JTL file.static HashTree
Load a Test tree (JMX file)static void
saveElement
(Object el, OutputStream out) static void
saveSampleResult
(SampleEvent evt, Writer writer) Save a sampleResult to an XML output file using XStream.static void
saveTree
(HashTree tree, OutputStream out)
-
Field Details
-
SAMPLE_EVENT_OBJECT
- See Also:
-
RESULTCOLLECTOR_HELPER_OBJECT
- See Also:
-
TEST_CLASS_NAME
- See Also:
-
-
Constructor Details
-
SaveService
public SaveService()
-
-
Method Details
-
loadProperties
- Throws:
IOException
-
aliasToClass
-
classToAlias
-
saveTree
- Throws:
IOException
-
saveElement
- Throws:
IOException
-
loadElement
- Throws:
IOException
-
saveSampleResult
Save a sampleResult to an XML output file using XStream.- Parameters:
evt
- sampleResult wrapped in a sampleEventwriter
- output stream which must be created usinggetFileEncoding(String)
- Throws:
IOException
- when writing data to output fails
-
loadTestResults
public static void loadTestResults(InputStream reader, ResultCollectorHelper resultCollectorHelper) throws IOException Read results from JTL file.- Parameters:
reader
- of the fileresultCollectorHelper
- helper class to enable TestResultWrapperConverter to deliver the samples- Throws:
IOException
- if an I/O error occurs
-
loadTree
Load 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
-
getFileEncoding
Returns 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
-
CEtoString
Simplify getMessage() output from XStream ConversionException- Parameters:
ce
- - ConversionException to analyse- Returns:
- string with details of error
-
getPropertiesVersion
-
getVERSION
-