Package org.apache.jmeter.protocol.http.sampler

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"))
          try
View Full Code Here


        }

        else if(tag.equalsIgnoreCase("textarea"))
          try
          {
            url.addArgument(getAttributeValue(nodeAtts, "name"),
                tempNode.getFirstChild().getNodeValue());
          }
          catch(NullPointerException e)
          {
            url.addArgument(getAttributeValue(nodeAtts, "name"), "");
View Full Code Here

            url.addArgument(getAttributeValue(nodeAtts, "name"),
                tempNode.getFirstChild().getNodeValue());
          }
          catch(NullPointerException e)
          {
            url.addArgument(getAttributeValue(nodeAtts, "name"), "");
          }

        else if(tag.equalsIgnoreCase("select"))
          selectName = getAttributeValue(nodeAtts, "name");
View Full Code Here

            catch(NullPointerException e)
            {
              value = "";
            }
          }
          url.addArgument(selectName, value);
        }
      }
      else if(tag.equalsIgnoreCase("form"))
      {
        try
View Full Code Here

            response = new SampleResult();
            response.setResponseData(html.getBytes());
            URLRewritingModifier mod = new URLRewritingModifier();
            mod.setArgumentName("session_id");
            HTTPSampler 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()).getValue());
View Full Code Here

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

   *@exception  Exception  Description of Exception
   ***********************************************************/
  public void testSimpleFormParse() throws Exception
  {
    HTTPSampler config = makeUrlConfig(".*index.html");
    config.addArgument("test","g.*");
    config.setMethod(HTTPSampler.POST);
    HTTPSampler 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

   *@exception  Exception  Description of Exception
   ***********************************************************/
  public void testBadCharParse() throws Exception
  {
    HTTPSampler config = makeUrlConfig(".*index.html");
    config.addArgument("te$st","g.*");
    config.setMethod(HTTPSampler.POST);
    HTTPSampler 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

            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

        }

        else if(tag.equalsIgnoreCase("textarea"))
          try
          {
            url.addArgument(getAttributeValue(nodeAtts, "name"),
                tempNode.getFirstChild().getNodeValue());
          }
          catch(NullPointerException e)
          {
            url.addArgument(getAttributeValue(nodeAtts, "name"), "");
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.