Package org.apache.jmeter.testelement.property

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


     * @return    the QueryString value
     */
    public String getQueryString()
    {
        StringBuffer buf= new StringBuffer();
        PropertyIterator iter= getArguments().iterator();
        boolean first= true;
        while (iter.hasNext())
        {
            HTTPArgument item= null;
            try
            {
                item= (HTTPArgument)iter.next().getObjectValue();
            }
            catch (ClassCastException e)
            {
                item= new HTTPArgument((Argument)iter.next().getObjectValue());
            }
            if (!first)
            {
                buf.append("&");
            }
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

        else
        {
            sampler = (HTTPSamplerBase) 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

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

        paramTable.setModel(tableModel);
        UserParameters params = (UserParameters) el;
        CollectionProperty names = params.getNames();
        CollectionProperty threadValues = params.getThreadLists();
        tableModel.setColumnData(0, (List) names.getObjectValue());
        PropertyIterator iter = threadValues.iterator();
        if (iter.hasNext())
        {
            tableModel.setColumnData(1, (List) iter.next().getObjectValue());
        }
        int count = 2;
        while (iter.hasNext())
        {
            String colName = THREAD_COLUMNS + "_" + count;
            tableModel.addNewColumn(colName, String.class);
            tableModel.setColumnData(
                count,
                (List) iter.next().getObjectValue());
            count++;
        }
        perIterationCheck.setSelected(params.isPerIteration());
        super.configure(el);
    }
View Full Code Here

     * Send POST data from Entry to the open connection.
     */
    public void sendPostData(PostMethod post, HTTPSampler2 sampler)
        throws IOException
    {
        PropertyIterator args = sampler.getArguments().iterator();
        while (args.hasNext())
        {
            Argument arg = (Argument) args.next().getObjectValue();
            post.addParameter(arg.getName(),arg.getValue());
        }
        // If filename was specified then send the post using multipart syntax
        String filename = sampler.getFilename();
        if ((filename != null) && (filename.trim().length() > 0))
View Full Code Here

        if (headerManager != null)
        {
            CollectionProperty headers= headerManager.getHeaders();
            if (headers != null)
            {
                PropertyIterator i= headers.iterator();
                while (i.hasNext())
                {
                    org.apache.jmeter.protocol.http.control.Header header =
                      (org.apache.jmeter.protocol.http.control.Header)i.next().getObjectValue();
                    String n=header.getName();
                    String v=header.getValue();
                    method.setRequestHeader(n,v);
                    hdrs.append(n)
          hdrs.append(": ")
View Full Code Here

        {
      if (log.isDebugEnabled())
      {
            log.debug(Thread.currentThread().getName() + " Running up named: " + getName());//$NON-NLS-1$
      }
            PropertyIterator namesIter = getNames().iterator();
            PropertyIterator valueIter = getValues().iterator();
            JMeterVariables jmvars = getThreadContext().getVariables();
            while (namesIter.hasNext() && valueIter.hasNext())
            {
                String name = namesIter.next().getStringValue();
                String value = valueIter.next().getStringValue();
        if (log.isDebugEnabled())
        {
                    log.debug(Thread.currentThread().getName()+" saving variable: "+name+"="+value);//$NON-NLS-1$
        }
                jmvars.put(name, value);
View Full Code Here

        if (headerManager != null)
        {
            CollectionProperty headers= headerManager.getHeaders();
            if (headers != null)
            {
                PropertyIterator i= headers.iterator();
                while (i.hasNext())
                {
                    Header header= (Header)i.next().getObjectValue();
                    String n=header.getName();
                    String v=header.getValue();
                    conn.setRequestProperty(n,v);
                    hdrs.append(n)
          hdrs.append(": ")
View Full Code Here

        TestElement clonedElement = null;
        try
        {
            clonedElement = (TestElement) this.getClass().newInstance();

      PropertyIterator iter = propertyIterator();
      while (iter.hasNext())
      {
        clonedElement.setProperty((JMeterProperty) iter.next().clone());
      }
      clonedElement.setRunningVersion(runningVersion);
        }
        catch (Exception e)
        {}
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.