Examples of TestPlan


Examples of br.eti.kinoshita.testlinkjavaapi.model.TestPlan

    /**
     * @param map
     * @return Test Plan.
     */
    public static final TestPlan getTestPlan(Map<String, Object> map) {
        TestPlan testPlan = null;
        if (map != null && map.size() > 0) {
            Object o = map.get(TestLinkResponseParams.ID.toString());
            if (o != null) {
                Integer id = Integer.parseInt(o.toString());

                if (id > 0) {
                    testPlan = new TestPlan();
                    testPlan.setId(id);

                    testPlan.setName(getString(map, TestLinkResponseParams.NAME.toString()));
                    testPlan.setProjectName(getString(map, TestLinkResponseParams.PROJECT_NAME.toString()));
                    testPlan.setNotes(getString(map, TestLinkResponseParams.NOTES.toString()));

                    testPlan.setActive(getBoolean(map, TestLinkResponseParams.ACTIVE.toString()));
                    testPlan.setPublic(getBoolean(map, TestLinkResponseParams.IS_PUBLIC.toString()));
                }

            }
        }
        return testPlan;
View Full Code Here

Examples of org.apache.jmeter.control.TestPlan

      ListedHashTree tree = handler.getDataTree();
      println("Created the tree successfully");

      NonGuiTree ngt = new NonGuiTree();
      ngt.addSubTree(tree, null);
      TestPlan tp = (TestPlan)ngt.compileComponent(ngt.getChildAt(0));
      println("Compiled the Test Plan successfully");

      Collection groups = tp.getThreadGroups();
      StandardJMeterEngine engine = new StandardJMeterEngine();
      for (Iterator i = groups.iterator(); i.hasNext(); ) {
        println("Adding a threadgroup");
        engine.addThreadGroup((ThreadGroup) i.next());
      }
View Full Code Here

Examples of org.apache.jmeter.control.TestPlan

   *@exception  java.io.IOException  !ToDo (Exception description)
   ***********************************************************/
  public void save(Saveable s, Writer out) throws java.io.IOException
  {
    out.write("<TestPlan>\n");
    TestPlan save = (TestPlan)s;
    JMeterHandler.writeThreadGroups(save.getThreadGroups(), out);
    JMeterHandler.writeConfigElements(save.getConfigElements(), out);
    out.write("</TestPlan>\n");
  }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

        return pop;
    }

    /* Implements JMeterGUIComponent.createTestElement() */
    public TestElement createTestElement() {
        TestPlan tp = new TestPlan();
        modifyTestElement(tp);
        return tp;
    }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

    /* Implements JMeterGUIComponent.modifyTestElement(TestElement) */
    public void modifyTestElement(TestElement plan) {
        super.configureTestElement(plan);
        if (plan instanceof TestPlan) {
            TestPlan tp = (TestPlan) plan;
            tp.setFunctionalMode(functionalMode.isSelected());
            tp.setSerialized(serializedMode.isSelected());
            tp.setUserDefinedVariables((Arguments) argsPanel.createTestElement());
            tp.setTestPlanClasspathArray(browseJar.getFiles());
        }
    }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

     */
    @Override
    public void configure(TestElement el) {
        super.configure(el);
        if (el instanceof TestPlan) {
            TestPlan tp = (TestPlan) el;
        functionalMode.setSelected(tp.isFunctionalMode());
        serializedMode.setSelected(tp.isSerialized());
        final JMeterProperty udv = tp.getUserDefinedVariablesAsProperty();
        if (udv != null) {
            argsPanel.configure((Arguments) udv.getObjectValue());
        }
        browseJar.setFiles(tp.getTestPlanClasspathArray());
        }
    }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

        checkPostRequestUrlEncoded(sampler, res, samplerDefaultEncoding, contentEncoding, 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

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

Examples of org.apache.jmeter.testelement.TestPlan

        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

Examples of org.apache.jmeter.testelement.TestPlan

        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
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.