Examples of TestElement


Examples of org.apache.jmeter.testelement.TestElement

                    "three" };
            int counter = 0;
            controller.initialize();
            while (counter < order.length)
            {
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    assertEquals(
                        "failed on " + counter,
                        order[counter],
                        sampler.getPropertyAsString(TestElement.NAME));
                    counter++;
                }
            }
        }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

                    "three" };
            int counter = 0;
            controller.initialize();
            while (counter < order.length)
            {
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    assertEquals(
                        "failed on" + counter,
                        order[counter],
                        sampler.getPropertyAsString(TestElement.NAME));
                    counter++;
                }
            }
        }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

            String[] order = new String[] { "one", "three", "two", "four" };
            int counter = 0;
            controller.initialize();
            while (counter < order.length)
            {
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    assertEquals(
                        "failed on" + counter,
                        order[counter],
                        sampler.getPropertyAsString(TestElement.NAME));
                    counter++;
                }
            }
        }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

            String[] order = new String[] { "one", "two", "three", "four" };
            int counter = 0;
            controller.initialize();
            while (counter < order.length)
            {
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    assertEquals(
                        "failed on" + counter,
                        order[counter],
                        sampler.getPropertyAsString(TestElement.NAME));
                    counter++;
                }
            }
        }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

                counter = 0;
                if (i > 0)
                {
                    counter = 2;
                }
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    if (i == 0 && counter < 2)
                    {
                        assertEquals(
                            interleaveOrder[counter],
                            sampler.getPropertyAsString(TestElement.NAME));
                    }
                    else
                    {
                        assertEquals(
                            order[counter],
                            sampler.getPropertyAsString(TestElement.NAME));
                    }
                    counter++;
                }
            }
        }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

                counter = 0;
                if (i > 0)
                {
                    counter = 2;
                }
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    if (i == 0 && counter < 2)
                    {
                        assertEquals(
                            interleaveOrder[counter],
                            sampler.getPropertyAsString(TestElement.NAME));
                    }
                    else
                    {
                        assertEquals(
                            order[counter],
                            sampler.getPropertyAsString(TestElement.NAME));
                    }
                    counter++;
                }
            }
        }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

            RandomOrderController roc = new RandomOrderController();
            roc.addTestElement(new TestSampler("zero"));
            roc.addTestElement(new TestSampler("one"));
            roc.addTestElement(new TestSampler("two"));
            roc.addTestElement(new TestSampler("three"));
            TestElement sampler = null;
            List usedSamplers = new ArrayList();
            roc.initialize();
            while ((sampler = roc.next()) != null)
            {
                String samplerName = sampler.getPropertyAsString(TestSampler.NAME);
                if (usedSamplers.contains(samplerName))
                {
                    assertTrue("Duplicate sampler returned from next()", false);
                }
                usedSamplers.add(samplerName);
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

        public void testRandomOrderOneElement()
        {
            RandomOrderController roc = new RandomOrderController();
            roc.addTestElement(new TestSampler("zero"));
            TestElement sampler = null;
            List usedSamplers = new ArrayList();
            roc.initialize();
            while ((sampler = roc.next()) != null)
            {
                String samplerName = sampler.getPropertyAsString(TestSampler.NAME);
                if (usedSamplers.contains(samplerName))
                {
                    assertTrue("Duplicate sampler returned from next()", false);
                }
                usedSamplers.add(samplerName);
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

  {
    String name = guiItem.getClass().getName();
     
    //TODO these assertions should be separate tests
     
    TestElement el = guiItem.createTestElement();
    assertNotNull(
    name+".createTestElement should be non-null ", el);
    assertEquals(
      "GUI-CLASS: Failed on " + name,
      name,
      el.getPropertyAsString(TestElement.GUI_CLASS));

    assertEquals(
      "NAME: Failed on " + name,
      guiItem.getName(),
      el.getPropertyAsString(TestElement.NAME));
    assertEquals(
      "TEST-CLASS: Failed on " + name,
      el.getClass().getName(),
      el.getPropertyAsString(TestElement.TEST_CLASS));
    TestElement el2 = guiItem.createTestElement();
    el.setProperty(TestElement.NAME, "hey, new name!:");
    el.setProperty("NOT", "Shouldn't be here");
    if (!(guiItem instanceof UnsharedComponent))
    {
      assertEquals(
        "SHARED: Failed on " + name,
        "",
        el2.getPropertyAsString("NOT"));
    }
    log.debug("Saving element: " + el.getClass());
    el =
      SaveService.createTestElement(
        SaveService.getConfigForTestElement(null, el));
    log.debug("Successfully saved");
    guiItem.configure(el);
    assertEquals(
      "CONFIGURE-TEST: Failed on " + name,
      el.getPropertyAsString(TestElement.NAME),
      guiItem.getName());
    guiItem.modifyTestElement(el2);
    assertEquals(
      "Modify Test: Failed on " + name,
      "hey, new name!:",
      el2.getPropertyAsString(TestElement.NAME));
  }
View Full Code Here

Examples of org.apache.jmeter.testelement.TestElement

  {
    TestSuite suite = new TestSuite("TestElements");
    Iterator iter = getObjects(TestElement.class).iterator();
    while (iter.hasNext())
    {
      TestElement item = (TestElement) iter.next();
      TestSuite ts = new TestSuite(item.getClass().getName());
      ts.addTest(new JMeterTest("runTestElement",item));
      suite.addTest(ts);
    }
    return suite;
  }
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.