Examples of TestPlan


Examples of org.apache.jmeter.testelement.TestPlan

    private void addTimers(
        JMeterTreeModel model,
        JMeterTreeNode node,
        long deltaT)
    {
        TestPlan variables= new TestPlan();
        variables.addParameter("T", Long.toString(deltaT));
        ValueReplacer replacer= new ValueReplacer(variables);
        JMeterTreeNode mySelf= model.getNodeOf(this);
        Enumeration children= mySelf.children();
        while (children.hasMoreElements())
        {
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

    }
   
    public void testReverseReplacement() throws Exception
    {
      ValueReplacer replacer = new ValueReplacer(variables);
      TestElement element = new TestPlan();
      element.setProperty("domain","jakarta.apache.org");
      List args = new LinkedList();
      args.add("username is jack");
      args.add("jacks_password");
      element.setProperty("args",args);
      replacer.reverseReplace(element);
      assertEquals("${server}",element.getProperty("domain"));
    }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

   *
   *@return   !ToDo (Return description)
   ***************************************/
  public TestElement createTestElement()
  {
    TestPlan tp = new TestPlan();
    tp.setProperty(TestElement.GUI_CLASS, this.getClass().getName());
    tp.setProperty(TestElement.TEST_CLASS, TestPlan.class.getName());
    tp.setName(getName());
    tp.setFunctionalMode(functionalMode.isSelected());
    tp.setUserDefinedVariables((Arguments)argsPanel.createTestElement());
    return tp;
  }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

     *            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<JMeterTreeNode> children = mySelf.children();
        while (children.hasMoreElements()) {
            JMeterTreeNode templateNode = children.nextElement();
View Full Code Here

Examples of org.apache.jmeter.testelement.TestPlan

                        }
                    }

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

Examples of org.apache.jmeter.testelement.TestPlan

    }

    /* Implements JMeterGUIComponent.createTestElement() */
    @Override
    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) */
    @Override
    public void modifyTestElement(TestElement plan) {
        super.configureTestElement(plan);
        if (plan instanceof TestPlan) {
            TestPlan tp = (TestPlan) plan;
            tp.setFunctionalMode(functionalMode.isSelected());
            tp.setTearDownOnShutdown(tearDownOnShutdown.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());
        tearDownOnShutdown.setSelected(tp.isTearDownOnShutdown());
        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

     * @deprecated - only for use by JMeter class!
     * @param o - dummy
     */
    @Deprecated
    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

Examples of org.apache.jmeter.testelement.TestPlan

    public HashTree addSubTree(HashTree subTree, JMeterTreeNode current) throws IllegalUserActionException {
        Iterator<Object> 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
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.