Apache JMeter
2.1.1

org.apache.jmeter.save
Class OldSaveService

java.lang.Object
  extended byorg.apache.jmeter.save.OldSaveService
All Implemented Interfaces:
SaveServiceConstants

public final class OldSaveService
extends Object
implements SaveServiceConstants

This class provides a means for saving test results. Test results are typically saved in an XML file, but other storage mechanisms may also be used, for instance, CSV files or databases.

Version:
$Revision: 1.9.2.3 $ $Date: 2005/09/20 15:28:23 $

Field Summary
 
Fields inherited from interface org.apache.jmeter.save.SaveServiceConstants
ASSERTION_RESULT_TAG_NAME, BINARY, DATA_TYPE, ERROR, FAILURE, FAILURE_MESSAGE, LABEL, PRESERVE, RESPONSE_CODE, RESPONSE_MESSAGE, SAMPLE_RESULT_TAG_NAME, SUCCESSFUL, THREAD_NAME, TIME, TIME_STAMP, XML_SPACE
 
Method Summary
static TestElement createTestElement(org.apache.avalon.framework.configuration.Configuration config)
           
static AssertionResult getAssertionResult(org.apache.avalon.framework.configuration.Configuration config)
           
static byte[] getBinaryData(org.apache.avalon.framework.configuration.Configuration config)
           
static org.apache.avalon.framework.configuration.Configuration getConfigForTestElement(String named, TestElement item)
           
static org.apache.avalon.framework.configuration.Configuration getConfiguration(AssertionResult assResult)
           
static org.apache.avalon.framework.configuration.Configuration getConfiguration(byte[] bin)
           
static org.apache.avalon.framework.configuration.Configuration getConfiguration(SampleResult result, SampleSaveConfiguration saveConfig)
          This method determines the content of the result data that will be stored.
static SampleResult getSampleResult(org.apache.avalon.framework.configuration.Configuration config)
           
static HashTree loadSubTree(InputStream in)
           
static SampleResult makeResultFromDelimitedString(String delim)
          Make a SampleResult given a delimited string.
static String printableFieldNamesToString()
          Generates the field names for the output file
static String printableFieldNamesToString(SampleSaveConfiguration saveConfig)
          Generates the field names for the output file
static String resultToDelimitedString(SampleResult sample)
          Convert a result into a string, where the fields of the result are separated by the default delimiter.
static String resultToDelimitedString(SampleResult sample, String delimiter)
          Convert a result into a string, where the fields of the result are separated by a specified String.
static void saveCSVStats(Vector data, FileWriter writer)
          Method will save aggregate statistics as CSV.
static void saveSubTree(HashTree subTree, OutputStream writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeResultFromDelimitedString

public static SampleResult makeResultFromDelimitedString(String delim)
Make a SampleResult given a delimited string.

Parameters:
delim -
Returns:
SampleResult

printableFieldNamesToString

public static String printableFieldNamesToString()
Generates the field names for the output file

Returns:
the field names as a string

printableFieldNamesToString

public static String printableFieldNamesToString(SampleSaveConfiguration saveConfig)
Generates the field names for the output file

Returns:
the field names as a string

saveSubTree

public static void saveSubTree(HashTree subTree,
                               OutputStream writer)
                        throws IOException
Throws:
IOException

saveCSVStats

public static void saveCSVStats(Vector data,
                                FileWriter writer)
                         throws IOException
Method will save aggregate statistics as CSV. For now I put it here. Not sure if it should go in the newer SaveService instead of here. if we ever decide to get rid of this class, we'll need to move this method to the new save service.

Parameters:
data -
writer -
Throws:
IOException

getSampleResult

public static SampleResult getSampleResult(org.apache.avalon.framework.configuration.Configuration config)

getConfiguration

public static org.apache.avalon.framework.configuration.Configuration getConfiguration(byte[] bin)

getBinaryData

public static byte[] getBinaryData(org.apache.avalon.framework.configuration.Configuration config)

getAssertionResult

public static AssertionResult getAssertionResult(org.apache.avalon.framework.configuration.Configuration config)

getConfiguration

public static org.apache.avalon.framework.configuration.Configuration getConfiguration(AssertionResult assResult)

getConfiguration

public static org.apache.avalon.framework.configuration.Configuration getConfiguration(SampleResult result,
                                                                                       SampleSaveConfiguration saveConfig)
This method determines the content of the result data that will be stored.

Parameters:
result - the object containing all of the data that has been collected.

resultToDelimitedString

public static String resultToDelimitedString(SampleResult sample)
Convert a result into a string, where the fields of the result are separated by the default delimiter.

Parameters:
sample - the test result to be converted
Returns:
the separated value representation of the result

resultToDelimitedString

public static String resultToDelimitedString(SampleResult sample,
                                             String delimiter)
Convert a result into a string, where the fields of the result are separated by a specified String.

Parameters:
sample - the test result to be converted
delimiter - the separation string
Returns:
the separated value representation of the result

getConfigForTestElement

public static org.apache.avalon.framework.configuration.Configuration getConfigForTestElement(String named,
                                                                                              TestElement item)

loadSubTree

public static HashTree loadSubTree(InputStream in)
                            throws IOException
Throws:
IOException

createTestElement

public static TestElement createTestElement(org.apache.avalon.framework.configuration.Configuration config)
                                     throws org.apache.avalon.framework.configuration.ConfigurationException,
                                            ClassNotFoundException,
                                            IllegalAccessException,
                                            InstantiationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
ClassNotFoundException
IllegalAccessException
InstantiationException

Apache JMeter
2.1.1

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