Package org.apache.jmeter.testelement

Examples of org.apache.jmeter.testelement.TestPlan


        checkPostRequestFormMultipart(sampler, res, samplerDefaultEncoding, contentEncoding, titleField, titleValue, descriptionField, descriptionValue);
       
        // Test sending data as UTF-8, where user defined variables are used
        // to set the value for form data
        JMeterUtils.setLocale(Locale.ENGLISH);
        TestPlan testPlan = new TestPlan();
        JMeterVariables vars = new JMeterVariables();
        vars.put("title_prefix", "a test\u00c5");
        vars.put("description_suffix", "the_end");
        JMeterContextService.getContext().setVariables(vars);
        JMeterContextService.getContext().setSamplingStarted(true);
        ValueReplacer replacer = new ValueReplacer();
        replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
       
        sampler = createHttpSampler(samplerType);
        contentEncoding = "UTF-8";
        titleValue = "${title_prefix}mytitle\u0153\u20a1\u0115\u00c5";
        descriptionValue = "mydescription\u0153\u20a1\u0115\u00c5${description_suffix}";
View Full Code Here


        checkPostRequestBody(sampler, res, samplerDefaultEncoding, contentEncoding, expectedPostBody);
       
        // Test sending data as UTF-8, where user defined variables are used
        // to set the value for form data
        JMeterUtils.setLocale(Locale.ENGLISH);
        TestPlan testPlan = new TestPlan();
        JMeterVariables vars = new JMeterVariables();
        vars.put("title_prefix", "a test\u00c5");
        vars.put("description_suffix", "the_end");
        JMeterContextService.getContext().setVariables(vars);
        JMeterContextService.getContext().setSamplingStarted(true);
        ValueReplacer replacer = new ValueReplacer();
        replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
       
        sampler = createHttpSampler(samplerType);
        contentEncoding = "UTF-8";
        titleValue = "${title_prefix}mytitle\u0153\u20a1\u0115\u00c5";
        descriptionValue = "mydescription\u0153\u20a1\u0115\u00c5${description_suffix}";
View Full Code Here

        checkGetRequest_Parameters(sampler, res, contentEncoding, executedUrl, titleField, titleValue, descriptionField, descriptionValue, true);

        // Test sending data as UTF-8, where user defined variables are used
        // to set the value for form data
        JMeterUtils.setLocale(Locale.ENGLISH);
        TestPlan testPlan = new TestPlan();
        JMeterVariables vars = new JMeterVariables();
        vars.put("title_prefix", "a test\u00c5");
        vars.put("description_suffix", "the_end");
        JMeterContextService.getContext().setVariables(vars);
        JMeterContextService.getContext().setSamplingStarted(true);
        ValueReplacer replacer = new ValueReplacer();
        replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
       
        sampler = createHttpSampler(samplerType);
        contentEncoding = "UTF-8";
        titleValue = "${title_prefix}mytitle\u0153\u20a1\u0115\u00c5";
        descriptionValue = "mydescription\u0153\u20a1\u0115\u00c5${description_suffix}";
View Full Code Here

   *            Sampler node in where we will add the timers
   * @param deltaT
   *            Time interval from the previous request
   */
  private void addTimers(JMeterTreeModel model, JMeterTreeNode node, long deltaT) {
    TestPlan variables = new TestPlan();
    variables.addParameter("T", Long.toString(deltaT)); // $NON-NLS-1$
    ValueReplacer replacer = new ValueReplacer(variables);
    JMeterTreeNode mySelf = model.getNodeOf(this);
    Enumeration children = mySelf.children();
    while (children.hasMoreElements()) {
      JMeterTreeNode templateNode = (JMeterTreeNode) children.nextElement();
View Full Code Here

            }
          }

          // Special case for the TestPlan's Arguments sub-element:
          if (element instanceof TestPlan) {
            TestPlan tp = (TestPlan) element;
            Arguments args = tp.getArguments();
            if (myClass.isInstance(args)) {
              if (ascending) {
                elements.addFirst(args);
              } else {
                elements.add(args);
View Full Code Here

   *
   * @deprecated - only for use by JMeter class!
   * @param o - dummy
   */
  public JMeterTreeModel(Object o) {
    this(new TestPlan(),new WorkBench());
//    super(new JMeterTreeNode(new WorkBench(), null));
//    TestElement tp = new TestPlan();
//    initTree(tp, new WorkBench());
  }
View Full Code Here

  public HashTree addSubTree(HashTree subTree, JMeterTreeNode current) throws IllegalUserActionException {
    Iterator iter = subTree.list().iterator();
    while (iter.hasNext()) {
      TestElement item = (TestElement) iter.next();
      if (item instanceof TestPlan) {
        TestPlan tp = (TestPlan) item;
        current = (JMeterTreeNode) ((JMeterTreeNode) getRoot()).getChildAt(0);
        final TestPlan userObject = (TestPlan) current.getUserObject();
        userObject.addTestElement(item);
        userObject.setName(item.getName());
        userObject.setFunctionalMode(tp.isFunctionalMode());
        userObject.setSerialized(tp.isSerialized());
        addSubTree(subTree.getTree(item), current);
      } else if (item instanceof WorkBench) {
        current = (JMeterTreeNode) ((JMeterTreeNode) getRoot()).getChildAt(1);
        final TestElement testElement = ((TestElement) current.getUserObject());
        testElement.addTestElement(item);
View Full Code Here

                break;
            case 7:
                // Test sending data as UTF-8, where user defined variables are used
                // to set the value for form data
                JMeterUtils.setLocale(Locale.ENGLISH);
                TestPlan testPlan = new TestPlan();
                JMeterVariables vars = new JMeterVariables();
                vars.put("title_prefix", "a test\u00c5");
                vars.put("description_suffix", "the_end");
                JMeterContextService.getContext().setVariables(vars);
                JMeterContextService.getContext().setSamplingStarted(true);
                ValueReplacer replacer = new ValueReplacer();
                replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
               
                contentEncoding = "UTF-8";
                titleValue = "${title_prefix}mytitle7\u0153\u20a1\u0115\u00c5";
                descriptionValue = "mydescription7\u0153\u20a1\u0115\u00c5${description_suffix}";
                setupUrl(sampler, contentEncoding);
View Full Code Here

        checkPostRequestFormMultipart(sampler, res, samplerDefaultEncoding, contentEncoding, titleField, titleValue, descriptionField, descriptionValue);
       
        // Test sending data as UTF-8, where user defined variables are used
        // to set the value for form data
        JMeterUtils.setLocale(Locale.ENGLISH);
        TestPlan testPlan = new TestPlan();
        JMeterVariables vars = new JMeterVariables();
        vars.put("title_prefix", "a test\u00c5");
        vars.put("description_suffix", "the_end");
        JMeterContextService.getContext().setVariables(vars);
        JMeterContextService.getContext().setSamplingStarted(true);
        ValueReplacer replacer = new ValueReplacer();
        replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
       
        sampler = createHttpSampler(samplerType);
        contentEncoding = "UTF-8";
        titleValue = "${title_prefix}mytitle\u0153\u20a1\u0115\u00c5";
        descriptionValue = "mydescription\u0153\u20a1\u0115\u00c5${description_suffix}";
View Full Code Here

        checkPostRequestBody(sampler, res, samplerDefaultEncoding, contentEncoding, expectedPostBody);

        // Test sending data as UTF-8, where user defined variables are used
        // to set the value for form data
        JMeterUtils.setLocale(Locale.ENGLISH);
        TestPlan testPlan = new TestPlan();
        JMeterVariables vars = new JMeterVariables();
        vars.put("title_prefix", "a test\u00c5");
        vars.put("description_suffix", "the_end");
        JMeterContextService.getContext().setVariables(vars);
        JMeterContextService.getContext().setSamplingStarted(true);
        ValueReplacer replacer = new ValueReplacer();
        replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
       
        sampler = createHttpSampler(samplerType);
        contentEncoding = "UTF-8";
        titleValue = "${title_prefix}mytitle\u0153\u20a1\u0115\u00c5";
        descriptionValue = "mydescription\u0153\u20a1\u0115\u00c5${description_suffix}";
View Full Code Here

TOP

Related Classes of org.apache.jmeter.testelement.TestPlan

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.