Package org.apache.jmeter.testelement.property

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


    }

    private void populateTable(CookieManager manager)
    {
        tableModel.clearData();
        PropertyIterator iter = manager.getCookies().iterator();
        while (iter.hasNext())
        {
            addCookieToTable((Cookie) iter.next().getObjectValue());
        }
    }
View Full Code Here


                    rand.nextInt(potentialLinks.size()));
            sampler.setDomain(url.getDomain());
            sampler.setPath(url.getPath());
            if (url.getMethod().equals(HTTPSampler.POST))
            {
                PropertyIterator iter = sampler.getArguments().iterator();
                while (iter.hasNext())
                {
                    Argument arg = (Argument) iter.next().getObjectValue();
                    modifyArgument(arg, url.getArguments());
                }
            }
            else
            {
View Full Code Here

    private void modifyArgument(Argument arg, Arguments args)
    {
        log.debug("Modifying argument: " + arg);
        List possibleReplacements = new ArrayList();
        PropertyIterator iter = args.iterator();
        Argument replacementArg;
        while (iter.hasNext())
        {
            replacementArg = (Argument) iter.next().getObjectValue();
            try
            {
                if (HtmlParsingUtils.isArgumentMatched(replacementArg, arg))
                {
                    possibleReplacements.add(replacementArg);
View Full Code Here

        HTTPSampler config)
        throws MalformedPatternException
    {
        boolean ok = true;
        Perl5Matcher matcher = (Perl5Matcher) localMatcher.get();
        PropertyIterator iter = config.getArguments().iterator();

        String query = null;
        try
        {
            query = JOrphanUtils.decode(newLink.getQueryString(),"UTF-8");
        }
        catch (UnsupportedEncodingException e)
        {
            // UTF-8 unsupported? You must be joking!
            log.error("UTF-8 encoding not supported!");
            throw new Error("Should not happen: "+e.toString());
        }

        if (query == null && config.getArguments().getArgumentCount() > 0)
        {
            return false;
        }
       
        while (iter.hasNext())
        {
            Argument item = (Argument) iter.next().getObjectValue();
            if (query.indexOf(item.getName() + "=") == -1)
            {
                if (!(ok =
                    ok
                        && matcher.contains(
View Full Code Here

      try
      {
         // Get the Matcher for this thread
         Perl5Matcher localMatcher = (Perl5Matcher) matcher.get();
         PropertyIterator iter = getTestStrings().iterator();
         while (iter.hasNext())
         {
            String stringPattern = iter.next().getStringValue();
            Pattern pattern =
               patternCache.getPattern(
                  stringPattern,
                  Perl5Compiler.READ_ONLY_MASK);
            boolean found;
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

        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

        return prop;
    }

    public void traverse(TestElementTraverser traverser)
    {
        PropertyIterator iter = propertyIterator();
        traverser.startTestElement(this);
        while (iter.hasNext())
        {
            traverseProperty(traverser, iter.next());
        }
        traverser.endTestElement(this);
    }
View Full Code Here

        traverser.endProperty(value);
    }

    protected void traverseMap(MapProperty map, TestElementTraverser traverser)
    {
        PropertyIterator iter = map.valueIterator();
        while (iter.hasNext())
        {
            traverseProperty(traverser, iter.next());
        }
    }
View Full Code Here

    protected void traverseCollection(
        CollectionProperty col,
        TestElementTraverser traverser)
    {
        PropertyIterator iter = col.iterator();
        while (iter.hasNext())
        {
            traverseProperty(traverser, iter.next());
        }
    }
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.