Package org.apache.jmeter.samplers

Examples of org.apache.jmeter.samplers.SampleSaveConfiguration


    /** {@inheritDoc} */
    @Override
    public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
        HTTPSampleResult res = (HTTPSampleResult) obj;
        SampleSaveConfiguration save = res.getSaveConfig();
        setAttributes(writer, context, res, save);
        saveAssertions(writer, context, res, save);
        saveSubResults(writer, context, res, save);
        saveResponseHeaders(writer, context, res, save);
        saveRequestHeaders(writer, context, res, save);
View Full Code Here


     * No-arg constructor.
     */
    public ResultCollector() {
        setErrorLogging(false);
        setSuccessOnlyLogging(false);
        setProperty(new ObjectProperty(SAVE_CONFIG, new SampleSaveConfiguration()));
    }
View Full Code Here

        SampleResult result = event.getResult();

        if (isSampleWanted(result.isSuccessful())) {
            sendToVisualizer(result);
            if (out != null && !isResultMarked(result) && !this.isStats) {
                SampleSaveConfiguration config = getSaveConfig();
                result.setSaveConfig(config);
                try {
                    if (config.saveAsXml()) {
                        if (SaveService.isSaveTestLogFormat20()) {
                            if (serializer == null) {
                                serializer = new DefaultConfigurationSerializer();
                            }
                            out.write(OldSaveService.getSerializedSampleResult(result, serializer, config));
View Full Code Here

     */
    public SampleSaveConfiguration getSaveConfig() {
        try {
            return (SampleSaveConfiguration) getProperty(SAVE_CONFIG).getObjectValue();
        } catch (ClassCastException e) {
            setSaveConfig(new SampleSaveConfiguration());
            return getSaveConfig();
        }
    }
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
        HTTPSampleResult res = (HTTPSampleResult) obj;
        SampleSaveConfiguration save = res.getSaveConfig();
        setAttributes(writer, context, res, save);
        saveAssertions(writer, context, res, save);
        saveSubResults(writer, context, res, save);
        saveResponseHeaders(writer, context, res, save);
        saveRequestHeaders(writer, context, res, save);
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
        SampleResult res = (SampleResult) obj;
        SampleSaveConfiguration save = res.getSaveConfig();
        setAttributes(writer, context, res, save);
        saveAssertions(writer, context, res, save);
        saveSubResults(writer, context, res, save);
        saveResponseHeaders(writer, context, res, save);
        saveRequestHeaders(writer, context, res, save);
View Full Code Here

   *      com.thoughtworks.xstream.io.HierarchicalStreamWriter,
   *      com.thoughtworks.xstream.converters.MarshallingContext)
   */
  public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
    HTTPSampleResult res = (HTTPSampleResult) obj;
    SampleSaveConfiguration save = res.getSaveConfig();
    setAttributes(writer, context, res, save);
    saveAssertions(writer, context, res, save);
    saveSubResults(writer, context, res, save);
    saveResponseHeaders(writer, context, res, save);
    saveRequestHeaders(writer, context, res, save);
View Full Code Here

   *      com.thoughtworks.xstream.converters.MarshallingContext)
   */
  public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
        super.marshal(obj, writer, context); // Save most things
       
        SampleSaveConfiguration prop = (SampleSaveConfiguration) obj;
       
        // Save the new fields - but only if they are not the default
        createNode(writer,prop.saveBytes(),NODE_BYTES);
        createNode(writer,prop.saveUrl(),NODE_URL);
        createNode(writer,prop.saveFileName(),NODE_FILENAME);
        createNode(writer,prop.saveHostname(),NODE_HOSTNAME);
        createNode(writer,prop.saveThreadCounts(),NODE_THREAD_COUNT);
        createNode(writer,prop.saveSampleCount(),NODE_SAMPLE_COUNT);
  }
View Full Code Here

    final Class thisClass = SampleSaveConfiguration.class;
    final Class requiredType = context.getRequiredType();
    if (requiredType != thisClass) {
      throw new IllegalArgumentException("Unexpected class: "+requiredType.getName());
    }
    SampleSaveConfiguration result = new SampleSaveConfiguration();
    result.setBytes(false); // Maintain backward compatibility (bytes was not in the JMX file)
    while (reader.hasMoreChildren()) {
      reader.moveDown();
      String nn = reader.getNodeName();
      if (!"formatter".equals(nn)){// Skip formatter (if present) bug 42674 $NON-NLS-1$
        String fieldName = mapper.realMember(thisClass, nn);
View Full Code Here

   *      com.thoughtworks.xstream.io.HierarchicalStreamWriter,
   *      com.thoughtworks.xstream.converters.MarshallingContext)
   */
  public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) {
    SampleResult res = (SampleResult) obj;
    SampleSaveConfiguration save = res.getSaveConfig();
    setAttributes(writer, context, res, save);
    saveAssertions(writer, context, res, save);
    saveSubResults(writer, context, res, save);
    saveResponseHeaders(writer, context, res, save);
    saveRequestHeaders(writer, context, res, save);
View Full Code Here

TOP

Related Classes of org.apache.jmeter.samplers.SampleSaveConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.