Package org.apache.jmeter.testelement.property

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


     *
     * @param arg the argument to remove
     */
    public void removeArgument(Argument arg)
    {
        PropertyIterator iter = getArguments().iterator();
        while (iter.hasNext())
        {
            Argument item = (Argument) iter.next().getObjectValue();
            if (arg.equals(item))
            {
                iter.remove();
            }
        }
    }
View Full Code Here


     *
     * @param argName the name of the argument to remove
     */
    public void removeArgument(String argName)
    {
        PropertyIterator iter = getArguments().iterator();
        while (iter.hasNext())
        {
            Argument arg = (Argument) iter.next().getObjectValue();
            if (arg.getName().equals(argName))
            {
                iter.remove();
            }
        }
    }
View Full Code Here

    private Map getJDBCProperties()
    {
        Map props = new HashMap();
       
        PropertyIterator iter = propertyIterator();
        while (iter.hasNext())
        {
            JMeterProperty prop = iter.next();
            if (prop.getName().startsWith(JDBCSAMPLER_PROPERTY_PREFIX))
            {
                props.put(prop.getName(), prop);
            }
        }
View Full Code Here

        {
            return;
        }
        HTTPSampler config = (HTTPSampler) entry;
        Map currentUser = allAvailableUsers.getNextUserMods();
        PropertyIterator iter = config.getArguments().iterator();
        while (iter.hasNext())
        {
            Argument arg = (Argument) iter.next().getObjectValue();
            // if parameter name exists in http request
            // then change its value
            // (Note: each jmeter thread (ie user) gets to have unique values)
            if (currentUser.containsKey(arg.getName()))
            {
View Full Code Here

    return buf.toString();
  }

    private boolean matchesPatterns(String url, CollectionProperty patterns)
    {
        PropertyIterator iter = patterns.iterator();
        while (iter.hasNext())
        {
            String item = iter.next().getStringValue();
            Pattern pattern = null;
            try
            {
                pattern =
                    patternCache.getPattern(
View Full Code Here

     */
    public  void configure(TestElement el)
    {
        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

        super.configure(el);
        if (el instanceof Arguments)
        {
            tableModel.clearData();
            HTTPArgument.convertArgumentsToHTTP((Arguments) el);
            PropertyIterator iter = ((Arguments) el).getArguments().iterator();
            while (iter.hasNext())
            {
                HTTPArgument arg = (HTTPArgument) iter.next().getObjectValue();
                tableModel.addRow(arg);
            }
        }
        checkDeleteStatus();
    }
View Full Code Here

            file =
                new File(
                    System.getProperty("user.dir") + File.separator + authFile);
        PrintWriter writer = new PrintWriter(new FileWriter(file));
        writer.println("# JMeter generated Cookie file");
        PropertyIterator cookies = getCookies().iterator();
        while (cookies.hasNext())
        {
            Cookie cook = (Cookie) cookies.next().getObjectValue();
            writer.println(cook.toString());
        }
        writer.flush();
        writer.close();
    }
View Full Code Here

        }
    }

    public void removeCookieNamed(String name)
    {
        PropertyIterator iter = getCookies().iterator();
        while (iter.hasNext())
        {
            Cookie cookie = (Cookie) iter.next().getObjectValue();
            if (cookie.getName().equals(name))
            {
                iter.remove();
            }
        }
    }
View Full Code Here

        else
        {
            sampler = (HTTPSampler) sam;
        }
        boolean modified = false;
        PropertyIterator iter = sampler.getArguments().iterator();
        while (iter.hasNext())
        {
            Argument arg = (Argument) iter.next().getObjectValue();
            modified = modifyArgument(arg);
            if (modified)
            {
                break;
            }
View Full Code Here

TOP

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

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.