private void StartThreadGroup(AbstractThreadGroup group, int groupCount, SearchByType <AbstractThreadGroup> searcher, LinkedList <Object> testLevelElements, ListenerNotifier notifier)
        {
            int numThreads = group.GetNumThreads();

            NetMeterContextManager.AddTotalThreads(numThreads);
            Boolean onErrorStopTest      = group.GetOnErrorStopTest();
            Boolean onErrorStopTestNow   = group.GetOnErrorStopTestNow();
            Boolean onErrorStopThread    = group.GetOnErrorStopThread();
            Boolean onErrorStartNextLoop = group.GetOnErrorStartNextLoop();
            String  groupName            = group.GetName();

            log.Info("Starting " + numThreads + " threads for group " + groupName + ".");

            if (onErrorStopTest)
            {
                log.Info("Test will stop on error");
            }
            else if (onErrorStopTestNow)
            {
                log.Info("Test will stop abruptly on error");
            }
            else if (onErrorStopThread)
            {
                log.Info("Thread will stop on error");
            }
            else if (onErrorStartNextLoop)
            {
                log.Info("Thread will start next loop on error");
            }
            else
            {
                log.Info("Thread will continue on error");
            }
            OrderedHashTree threadGroupTree = (OrderedHashTree)searcher.GetSubTree(group);

            threadGroupTree.Put(group, testLevelElements);

            groups.Add(group);
            group.Start(groupCount, notifier, threadGroupTree, this);
        }
Exemple #2
0
 /**
  * Adds a feature to the AbstractThreadGroup attribute of the TestPlan object.
  *
  * @param group
  *            the feature to be added to the AbstractThreadGroup attribute
  */
 public void AddThreadGroup(AbstractThreadGroup group)
 {
     threadGroups.AddLast(group);
 }