Search in sources :

Example 6 with TestBeanGUI

use of org.apache.jmeter.testbeans.gui.TestBeanGUI in project jmeter by apache.

the class JMeterTest method suiteGUIComponents.

/*
     * Test GUI elements - create the suite of tests
     */
private static Test suiteGUIComponents() throws Exception {
    TestSuite suite = new TestSuite("GuiComponents");
    for (Object o : getObjects(JMeterGUIComponent.class)) {
        JMeterGUIComponent item = (JMeterGUIComponent) o;
        if (item instanceof JMeterTreeNode) {
            System.out.println("o.a.j.junit.JMeterTest 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("o.a.j.junit.JMeterTest INFO: JMeterGUIComponent: skipping some tests " + item.getClass().getName());
        } else {
            ts.addTest(new JMeterTest("GUIComponents2", item));
            ts.addTest(new JMeterTest("runGUITitle", item));
        }
        suite.addTest(ts);
    }
    return suite;
}
Also used : TestBeanGUI(org.apache.jmeter.testbeans.gui.TestBeanGUI) TestSuite(junit.framework.TestSuite) JMeterTreeNode(org.apache.jmeter.gui.tree.JMeterTreeNode) JMeterGUIComponent(org.apache.jmeter.gui.JMeterGUIComponent) ObsoleteGui(org.apache.jmeter.config.gui.ObsoleteGui)

Aggregations

TestBeanGUI (org.apache.jmeter.testbeans.gui.TestBeanGUI)6 JMeterGUIComponent (org.apache.jmeter.gui.JMeterGUIComponent)3 TestSuite (junit.framework.TestSuite)2 HeadlessException (java.awt.HeadlessException)1 IOException (java.io.IOException)1 ObsoleteGui (org.apache.jmeter.config.gui.ObsoleteGui)1 JMeterTreeNode (org.apache.jmeter.gui.tree.JMeterTreeNode)1 TestElement (org.apache.jmeter.testelement.TestElement)1