Package org.apache.jmeter.testelement

Examples of org.apache.jmeter.testelement.TestElement


            int counter= 0;
            sub_1.testStarted();
            controller.initialize();
            for (int i=0; i<3; i++)
            {
                TestElement sampler = null;
                while ((sampler = controller.next()) != null)
                {
                    assertEquals("Counter: "+counter+", i: "+i,
                        order[counter%order.length],
                        sampler.getPropertyAsString(TestElement.NAME)
                        );
                    counter++;
                }
                assertEquals(counter, 150*order.length);
                counter= 0;
View Full Code Here


   */
  private void convertSubTree(HashTree tree) {//TODO check build dependencies
      Iterator iter = new LinkedList(tree.list()).iterator();
      while (iter.hasNext())
      {
        TestElement item = (TestElement) iter.next();
        if (isEnabled(item))
        {//TODO handle ReplaceableControllers
//          if (item instanceof ReplaceableController)
//          {
//            System.out.println("Replaceable "+item.getClass().getName());
View Full Code Here

        Iterator iter = subTree.list().iterator();
        List configs = new LinkedList();

        while (iter.hasNext())
        {
            TestElement item = (TestElement) iter.next();
            DefaultConfiguration config =
                new DefaultConfiguration("node", "node");

            config.addChild(getConfigForTestElement(null, item));
            List configList = getConfigsFromTree(subTree.getTree(item));
View Full Code Here

            ConfigurationException,
            ClassNotFoundException,
            IllegalAccessException,
            InstantiationException
    {
        TestElement element = null;

    String testClass= (String) config.getAttribute("class");
        element = (TestElement) Class.forName(
          NameUpdater.getCurrentName(testClass)).newInstance();
        Configuration[] children = config.getChildren();

        for (int i = 0; i < children.length; i++)
        {
            if (children[i].getName().equals("property"))
            {
                try
                {
                    element.setProperty(createProperty(children[i], testClass));
                }
                catch (Exception ex)
                {
                    log.error("Problem loading property", ex);
                    element.setProperty(children[i].getAttribute("name"), "");
                }
            }
            else if (children[i].getName().equals("testelement"))
            {
                element.setProperty(
                    new TestElementProperty(
                        children[i].getAttribute("name",""),
                        createTestElement(children[i])));
            }
            else if (children[i].getName().equals("collection"))
            {
                element.setProperty(
                    new CollectionProperty(
                        children[i].getAttribute("name",""),
                        createCollection(children[i], testClass)));
            }
            else if (children[i].getName().equals("map"))
            {
                element.setProperty(
                    new MapProperty(
                        children[i].getAttribute("name",""),
                        createMap(children[i], testClass)));
            }
        }
View Full Code Here

        return map;
    }

    private static HashTree generateNode(Configuration config)
    {
        TestElement element = null;

        try
        {
            element = createTestElement(config.getChild("testelement"));
        }
View Full Code Here

   *@return   !ToDo (Return description)
   ***************************************/
  public TestElement createTestElement()
  {
    HTTPSampler sampler;
    TestElement el = urlConfigGui.createTestElement();
    if(getImages.isSelected())
    {
      sampler = new HTTPSamplerFull();
    }
    else
View Full Code Here

   *
   *@return   !ToDo (Return description)
   ***************************************/
  public TestElement createTestElement()
  {
    TestElement ce = super.createTestElement();
    configureTestElement(ce);
    ce.setProperty(HTTPSampler.MIMETYPE, mimetypeField.getText());
    ce.setProperty(HTTPSampler.FILE_NAME, filenameField.getText());
    ce.setProperty(HTTPSampler.FILE_FIELD, paramNameField.getText());
    return ce;
  }
View Full Code Here

          /*        IfController controller = new IfController("12==12");
              controller.initialize();
          */
          logger.debug(">>>>>   testProcessing : Starting the iteration  ");
          TestElement sampler = null;
          while ((sampler = controller.next()) != null) {
            logger.debug(
                "    ->>>  Gonna assertTrue :"
                  + sampler.getClass().getName()
                  + " Property is   ---->>>"
                  + sampler.getPropertyAsString(TestElement.NAME));
          }
      }
View Full Code Here

    {
        resetCurrent();
        resetIterCount();
        done = false;
        first = true;
        TestElement elem;
        for (int i = 0; i < subControllersAndSamplers.size(); i++)
        {
            elem = (TestElement) subControllersAndSamplers.get(i);
            if (elem instanceof Controller)
            {
View Full Code Here

    {
        fireIterEvents();
        log.debug("Calling next on: " + this.getClass().getName());
        if (isDone()) return null;
        Sampler returnValue = null;
        TestElement currentElement = null;
        try
        {
            currentElement = getCurrentElement();
            setCurrentElement(currentElement);
            if (currentElement == null)
View Full Code Here

TOP

Related Classes of org.apache.jmeter.testelement.TestElement

Copyright © 2018 www.massapicom. 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.