Package org.apache.jmeter.testelement.property

Examples of org.apache.jmeter.testelement.property.JMeterProperty


   /* (non-Javadoc)
    * @see org.apache.jmeter.testelement.TestListener#testStarted()
    */
   public void testStarted()
   {
      JMeterProperty pathP = getProperty(PATH);
      log.info("path property is a " + pathP.getClass().getName());
      log.info("path beginning value = " + pathP.getStringValue());
      if(pathP instanceof StringProperty && !"".equals(pathP.getStringValue()))
      {
         log.info("Encoding spaces in path");
         pathP.setObjectValue(encodeSpaces(pathP.getStringValue()));
      }
      else
      {
         log.info("setting dynamic path to true");
         dynamicPath = true;
      }
      log.info("path ending value = " + pathP.getStringValue());
   }
View Full Code Here


    {
      value= NameUpdater.getCurrentName(value, name, testClass);
    }
   
        // Create the property:
        JMeterProperty prop = (JMeterProperty) Class.forName(type).newInstance();
        prop.setName(name);
        prop.setObjectValue(value);

        return prop;
    }
View Full Code Here

        for (int i = 0; i < items.length; i++)
        {
            if (items[i].getName().equals("property"))
            {
                JMeterProperty prop = createProperty(items[i], testClass);
                map.put(prop.getName(), prop);
            }
            else if (items[i].getName().equals("testelement"))
            {
                map.put(
                    items[i].getAttribute("name",""),
View Full Code Here

      super.configure(el);
      tableModel.clearData();
      PropertyIterator iter = el.propertyIterator();
      while (iter.hasNext())
      {
         JMeterProperty prop = iter.next();
         tableModel
               .addRow(new Object[] { prop.getName(), prop.getStringValue()});
      }
      checkDeleteStatus();
   }
View Full Code Here

     * If it doesn't exist, a new NullProperty object is created
     * with the same name and returned.
     */
    public JMeterProperty getProperty(String key)
    {
        JMeterProperty prop = (JMeterProperty) propMap.get(key);
        if (prop == null)
        {
// TODO URGENT - does it make sense to create "different" NullProperty items for each key?
// Or would it be better to create them all with a key of "" ?
            prop = new NullProperty(key);
View Full Code Here

        return getProperty(key).getBooleanValue();
    }

  public boolean getPropertyAsBoolean(String key,boolean defaultVal)
  {
    JMeterProperty jmp = getProperty(key);
    return jmp instanceof NullProperty ? defaultVal: jmp.getBooleanValue();
  }
View Full Code Here

        }
        else
        {
            clearTemporary(property);
        }
        JMeterProperty prop = getProperty(property.getName());

        if (prop instanceof NullProperty
            || (prop instanceof StringProperty
                && prop.getStringValue().equals("")))
        {
            propMap.put(property.getName(), property);
        }
        else
        {
            prop.mergeIn(property);
        }
    }
View Full Code Here

        if (log.isDebugEnabled())
        {
            PropertyIterator iter = propertyIterator();
            while (iter.hasNext())
            {
                JMeterProperty prop = iter.next();
                log.debug(
                    "Property "
                        + prop.getName()
                        + " is temp? "
                        + isTemporary(prop)
                        + " and is a "
                        + prop.getObjectValue());
            }
        }
    }
View Full Code Here

    protected void mergeIn(TestElement element)
    {
        PropertyIterator iter = element.propertyIterator();
        while (iter.hasNext())
        {
            JMeterProperty prop = iter.next();
            addProperty(prop);
        }
    }
View Full Code Here

    {
        Iterator iter = propMap.entrySet().iterator();
        while (iter.hasNext())
        {
            Map.Entry entry = (Map.Entry)iter.next();
            JMeterProperty prop = (JMeterProperty)entry.getValue();
            if (isTemporary(prop))
            {
                iter.remove();
                clearTemporary(prop);
            }
            else
            {
                prop.recoverRunningVersion(this);
            }
        }
        emptyTemporary();
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.testelement.property.JMeterProperty

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.