Package org.apache.jmeter.testelement.property

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


    *
    *@return    !ToDo (Return description)
    ***********************************************************/
   public int getTestType()
   {
      JMeterProperty type = getProperty(TEST_TYPE);
      if (type instanceof NullProperty)
      {
         return CONTAINS;
      }
      else
      {
         return type.getIntValue();
      }
   }
View Full Code Here


        if (log.isDebugEnabled()) log.debug("Preparing "+this.getClass());
       
        for (PropertyIterator jprops= propertyIterator(); jprops.hasNext(); )
        {
            // Obtain a value of the appropriate type for this property.
            JMeterProperty jprop= jprops.next();
            PropertyDescriptor descriptor= (PropertyDescriptor)descriptors.get(jprop.getName());

            if (descriptor == null)
            {
              if (log.isDebugEnabled())
              {
          log.debug("Ignoring auxiliary property "+jprop.getName());
              }
        continue;
            }

            Class type= descriptor.getPropertyType();
            Object value= unwrapProperty(jprop, type);
           
      if (log.isDebugEnabled()) log.debug("Setting "+jprop.getName()+"="+value);

            // Set the bean's property to the value we just obtained:
      if (value != null || !type.isPrimitive())
        // We can't assign null to primitive types.
      {
View Full Code Here

        TestElement clonedItem = (TestElement) item.clone();
        cloneTesting(item, clonedItem);
        PropertyIterator iter2 = item.propertyIterator();
        while (iter2.hasNext())
        {
            JMeterProperty item2 = iter2.next();
            //[sebb] assertEquals(item2, clonedItem.getProperty(item2.getName()));
            assertEquals(item2.getStringValue(), clonedItem.getProperty(item2.getName()).getStringValue());
            assertTrue(item2 != clonedItem.getProperty(item2.getName()));
        }
    }
View Full Code Here

    }

    public void testParseExample6() throws Exception
    {
        StringProperty prop = new StringProperty("html", "${server}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
        assertEquals("jakarta.apache.org", newProp.getStringValue());
    }
View Full Code Here

    }

    public void testParseExample5() throws Exception
    {
        StringProperty prop = new StringProperty("html", "");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.StringProperty",
            newProp.getClass().getName());
        assertEquals("", newProp.getStringValue());
    }
View Full Code Here

    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(\\<([a-z]*)\\>,$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
        assertEquals("html", newProp.getStringValue());
    }
View Full Code Here

    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction((\\\\$\\d+\\.\\d+),$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
        assertEquals("$3.47", newProp.getStringValue());
    }
View Full Code Here

    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(([$]\\d+\\.\\d+),$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
        assertEquals("$3.47", newProp.getStringValue());
    }
View Full Code Here

        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(\\ "
                    + "(\\\\\\$\\d+\\.\\d+\\,\\\\$\\d+\\.\\d+),$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
        assertEquals("$3.47,$5.67", newProp.getStringValue());
    }
View Full Code Here

            new StringProperty(
                "html",
                "${__regexFunction(<html>(${my_regex})</html>,"
                    + "$1$)}${__regexFunction(<html>(.*o)(.*o)(.*)"
                    + "</html>,$1$$3$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
        assertEquals("hello worldhellorld", newProp.getStringValue());
    }
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.