Examples of JMeterGUIComponent


Examples of org.apache.jmeter.gui.JMeterGUIComponent

        }
        component.setProperty(TestElement.GUI_CLASS, NameUpdater
                .getCurrentName(component
                        .getPropertyAsString(TestElement.GUI_CLASS)));
        ReportGuiPackage.getInstance().updateCurrentNode();
        JMeterGUIComponent guicomp = ReportGuiPackage.getInstance().getGui(component);
        guicomp.configure(component);
        guicomp.modifyTestElement(component);
        ReportGuiPackage.getInstance().getCurrentGui(); // put the gui object back
        // to the way it was.
        ReportTreeNode newNode = new ReportTreeNode(component, this);

        // This check the state of the TestElement and if returns false it
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

    public Set<String> getActionNames() {
        return commands;
    }

    public void doAction(ActionEvent e) throws IllegalUserActionException {
        JMeterGUIComponent component = null;
        JComponent comp = null;
        if (!commands.contains(e.getActionCommand())) {
            throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand());
        }
        if (e.getActionCommand().equals(SAVE_GRAPHICS)) {
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

     */
    private static Test suiteGUIComponents() throws Exception {
        TestSuite suite = new TestSuite("GuiComponents");
        Iterator<Object> iter = getObjects(JMeterGUIComponent.class).iterator();
        while (iter.hasNext()) {
            JMeterGUIComponent item = (JMeterGUIComponent) iter.next();
            if (item instanceof JMeterTreeNode) {
                System.out.println("INFO: JMeterGUIComponent: skipping all tests  " + item.getClass().getName());
                continue;
            }
            if (item instanceof ObsoleteGui){
                continue;
            }
            TestSuite ts = new TestSuite(item.getClass().getName());
            ts.addTest(new JMeterTest("GUIComponents1", item));
            if (item instanceof TestBeanGUI) {
                System.out.println("INFO: JMeterGUIComponent: skipping some tests " + item.getClass().getName());
            } else {
                ts.addTest(new JMeterTest("GUIComponents2", item));
                ts.addTest(new JMeterTest("runGUITitle", item));
            }
            suite.addTest(ts);
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

        TestSuite suite = new TestSuite("BeanComponents");
        Iterator<Object> iter = getObjects(TestBean.class).iterator();
        while (iter.hasNext()) {
            Class<? extends Object> c = iter.next().getClass();
            try {
                JMeterGUIComponent item = new TestBeanGUI(c);
                // JMeterGUIComponent item = (JMeterGUIComponent) iter.next();
                TestSuite ts = new TestSuite(item.getClass().getName());
                ts.addTest(new JMeterTest("GUIComponents2", item));
                ts.addTest(new JMeterTest("runGUITitle", item));
                suite.addTest(ts);
            } catch (IllegalArgumentException e) {
                System.out.println("Cannot create test for " + c.getName() + " " + e);
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

  {
    TestSuite suite = new TestSuite("GuiComponents");
    Iterator iter = getObjects(JMeterGUIComponent.class).iterator();
    while (iter.hasNext())
    {
      JMeterGUIComponent item = (JMeterGUIComponent) iter.next();
      if (item instanceof JMeterTreeNode)
      {
        System.out.println("INFO: JMeterGUIComponent: skipping all tests  "+item.getClass().getName());
        continue;
      }
      TestSuite ts = new TestSuite(item.getClass().getName());
      ts.addTest(new JMeterTest("GUIComponents1",item));
      if (item instanceof TestBeanGUI)
      {
        System.out.println("INFO: JMeterGUIComponent: skipping some tests "+item.getClass().getName());
      }
      else
      {
        ts.addTest(new JMeterTest("GUIComponents2",item));
        ts.addTest(new JMeterTest("runGUITitle",item));
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

      Iterator iter = getObjects(TestBean.class).iterator();
          while (iter.hasNext())
          {
            Class c = iter.next().getClass();
            try {
          JMeterGUIComponent item = new TestBeanGUI(c);
          //JMeterGUIComponent item = (JMeterGUIComponent) iter.next();
                TestSuite ts = new TestSuite(item.getClass().getName());
          ts.addTest(new JMeterTest("GUIComponents2",item));
          ts.addTest(new JMeterTest("runGUITitle",item));
          suite.addTest(ts);
        }
        catch(IllegalArgumentException e)
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

                    || name.endsWith("TestBeanGUI"))// $NON-NLS-1$
                {
                  continue;// Don't try to instantiate these
                }
               
                JMeterGUIComponent item;
                try
                {
                    Class c = Class.forName(name);
                    if (TestBean.class.isAssignableFrom(c))
                    {
                        item = new TestBeanGUI(c);
                    }
                    else
                    {
                        item = (JMeterGUIComponent) c.newInstance();
                    }
                }
                catch (Throwable e)
                {
                    log.info("Could not instantiate "+name, e);
                    continue;
                }
                if (elementsToSkip.contains(name)
                    || elementsToSkip.contains(item.getStaticLabel()))
                {
                    log.info("Skipping "+name);
                    continue;
                }
                else
                {
                    elementsToSkip.add(name);
                }
                Collection categories = item.getMenuCategories();
                if (categories == null)
                {
                    log.debug(name+" participates in no menus.");
                    continue;
                }
                if (categories.contains(TIMERS))
                {
                    timers.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(POST_PROCESSORS))
                {
                    postProcessors.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(PRE_PROCESSORS))
                {
                    preProcessors.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(CONTROLLERS))
                {
                    controllers.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(SAMPLERS))
                {
                    samplers.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(NON_TEST_ELEMENTS))
                {
                    nonTestElements.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(LISTENERS))
                {
                    listeners.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(CONFIG_ELEMENTS))
                {
                    configElements.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }
                if (categories.contains(ASSERTIONS))
                {
                    assertions.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

            }
        }
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

        component.setProperty(
            TestElement.GUI_CLASS,
            NameUpdater.getCurrentName(
                component.getPropertyAsString(TestElement.GUI_CLASS)));
        GuiPackage.getInstance().updateCurrentNode();
        JMeterGUIComponent guicomp = GuiPackage.getInstance().getGui(component);
        guicomp.configure(component);
        guicomp.modifyTestElement(component);
        GuiPackage.getInstance().getCurrentGui(); //put the gui object back to the way it was.
        JMeterTreeNode newNode =
            new JMeterTreeNode((TestElement) component, this);

        // This check the state of the TestElement and if returns false it
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

    public void doAction(ActionEvent e)
    {
        GuiPackage guiPackage = GuiPackage.getInstance();
        if (e.getActionCommand().equals(CLEAR))
        {
            JMeterGUIComponent model = guiPackage.getCurrentGui();
            try
            {
                ((Clearable) model).clear();
            }
            catch (Throwable ex)
View Full Code Here

Examples of org.apache.jmeter.gui.JMeterGUIComponent

                if (name.endsWith("JMeterTreeNode") || name.endsWith("TestBeanGUI"))
                {
                  continue;// Don't try to instantiate these
                }
               
                JMeterGUIComponent item;
                try
                {
                    Class c = Class.forName(name);
                    if (TestBean.class.isAssignableFrom(c))
                    {
                        item = new TestBeanGUI(c);
                    }
                    else
                    {
                        item = (JMeterGUIComponent) c.newInstance();
                    }
                }
                catch (Throwable e)
                {
                    log.info("Could not instantiate "+name, e);
                    continue;
                }
                if (elementsToSkip.contains(name)
                    || elementsToSkip.contains(item.getStaticLabel()))
                {
                    log.info("Skipping "+name);
                    continue;
                }
                else
                {
                    elementsToSkip.add(name);
                }
                Collection categories = item.getMenuCategories();
                if (categories == null)
                {
                    log.debug(name+" participates in no menus.");
                    continue;
                }
                if (categories.contains(TIMERS))
                {
                    timers.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(POST_PROCESSORS))
                {
                    postProcessors.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(PRE_PROCESSORS))
                {
                    preProcessors.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(CONTROLLERS))
                {
                    controllers.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(SAMPLERS))
                {
                    samplers.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(NON_TEST_ELEMENTS))
                {
                    nonTestElements.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(LISTENERS))
                {
                    listeners.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }

                if (categories.contains(CONFIG_ELEMENTS))
                {
                    configElements.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            name));
                }
                if (categories.contains(ASSERTIONS))
                {
                    assertions.add(
                        new MenuInfo(
                            item.getStaticLabel(),
                            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.