Examples of addArgument()


Examples of org.apache.jmeter.protocol.http.config.UrlConfig.addArgument()

            inForm = false;
          }
        }
        else if(tag.equalsIgnoreCase("input"))
        {
          url.addArgument(getAttributeValue(nodeAtts, "name"),
              getAttributeValue(nodeAtts, "value"));
        }

        else if(tag.equalsIgnoreCase("textarea"))
          try
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.AccessLogSampler.addArgument()

    }
       
    public void testCloneSampler() throws Exception
    {
      AccessLogSampler sampler = (AccessLogSampler)gui.createTestElement();
      sampler.addArgument("param","value");
      AccessLogSampler clonedSampler = (AccessLogSampler)sampler.clone();
      clonedSampler.setRunningVersion(true);
      sampler.getArguments().getArgument(0).setValue("new value");
      assertEquals(
        "Sampler didn't clone correctly",
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPNullSampler.addArgument()

            assertTrue(HtmlParsingUtils.isAnchorMatched(target, pattern));
           
            target.addArgument("param2", "value2", "=");
            assertTrue(HtmlParsingUtils.isAnchorMatched(target, pattern));
           
            pattern.addArgument("param1", ".*", "=");
            assertFalse(HtmlParsingUtils.isAnchorMatched(target, pattern));
           
            target.addArgument("param1", "value1", "=");
            assertTrue(HtmlParsingUtils.isAnchorMatched(target, pattern));
        }
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSampler.addArgument()

                        inForm = false;
                    }
                }
                else if (tag.equalsIgnoreCase("input"))
                {
                    url.addArgument(
                        getAttributeValue(nodeAtts, "name"),
                        getAttributeValue(nodeAtts, "value"));
                }
                else if (tag.equalsIgnoreCase("textarea"))
                {
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSampler2.addArgument()

        }
       
        public void testCloneSampler() throws Exception
        {
            HTTPSampler2 sampler = (HTTPSampler2)gui.createTestElement();
            sampler.addArgument("param","value");
            HTTPSampler2 clonedSampler = (HTTPSampler2)sampler.clone();
            clonedSampler.setRunningVersion(true);
            sampler.getArguments().getArgument(0).setValue("new value");
            assertEquals(
                "Sampler didn't clone correctly",
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addArgument()

            String html = "location: http://server.com/index.html" + "?session_id=jfdkjdkf%20jddkfdfjkdjfdf%22;";
            response = new SampleResult();
            response.setResponseData(html, null);
            mod.setArgumentName("session_id");
            HTTPSamplerBase sampler = createSampler();
            sampler.addArgument("session_id", "adfasdfdsafasdfasd");
            context.setCurrentSampler(sampler);
            context.setPreviousResult(response);
            mod.process();
            Arguments args = sampler.getArguments();
            assertEquals("jfdkjdkf jddkfdfjkdjfdf\"", ((Argument) args.getArguments().get(0).getObjectValue())
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addArgument()

            String html = "location: http://server.com/index.html" + "?session[33]=jfdkjdkf%20jddkfdfjkdjfdf%22;";
            response = new SampleResult();
            response.setResponseData(html, null);
            mod.setArgumentName("session[33]");
            HTTPSamplerBase sampler = createSampler();
            sampler.addArgument("session[33]", "adfasdfdsafasdfasd");
            context.setCurrentSampler(sampler);
            context.setPreviousResult(response);
            mod.process();
            Arguments args = sampler.getArguments();
            assertEquals("jfdkjdkf jddkfdfjkdjfdf\"", ((Argument) args.getArguments().get(0).getObjectValue())
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addArgument()

                "<a href=\"#\" onclick=\"$(\'frame\').src=\'/index?param1=bla&sessionid=xyzxyzxyz\\'";
            response = new SampleResult();
            response.setResponseData(html, null);
            mod.setArgumentName("sessionid");
            HTTPSamplerBase sampler = createSampler();
            sampler.addArgument("sessionid", "xyzxyzxyz");
            context.setCurrentSampler(sampler);
            context.setPreviousResult(response);
            mod.process();
            Arguments args = sampler.getArguments();
            assertEquals("xyzxyzxyz", ((Argument) args.getArguments().get(0).getObjectValue())
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addArgument()

            assertEquals(config.getUrl().toString(), newUrl);
        }

        public void testSimpleFormParse() throws Exception {
            HTTPSamplerBase config = makeUrlConfig(".*index.html");
            config.addArgument("test", "g.*");
            config.setMethod(HTTPSamplerBase.POST);
            HTTPSamplerBase context = makeContext("http://www.apache.org/subdir/previous.html");
            String responseText = "<html><head><title>Test page</title></head><body>"
                    + "<form action=\"index.html\" method=\"POST\">" + "<input type=\"checkbox\" name=\"test\""
                    + " value=\"goto\">Goto index page</form></body></html>";
View Full Code Here

Examples of org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addArgument()

            assertEquals("test=goto", config.getQueryString());
        }

        public void testBadCharParse() throws Exception {
            HTTPSamplerBase config = makeUrlConfig(".*index.html");
            config.addArgument("te$st", "g.*");
            config.setMethod(HTTPSamplerBase.POST);
            HTTPSamplerBase context = makeContext("http://www.apache.org/subdir/previous.html");
            String responseText = "<html><head><title>Test page</title></head><body>"
                    + "<form action=\"index.html\" method=\"POST\">" + "<input type=\"checkbox\" name=\"te$st\""
                    + " value=\"goto\">Goto index page</form></body></html>";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.