0

We are running performance tests with nGrinder. We have use cases where we would desire to run multiple test scripts in parallel.

On their website it is stated that one user can only run one test at a time. So we setup two users but I see the same behavior: only one test script is running and the others are waiting in a READY state.

Is there any way in nGrinder to run multiple test scripts in parallel?

dragosb
  • 607
  • 8
  • 25

2 Answers2

0

It's only possible to run multiple test concurrently when these tests are submitted to execute by the different users if the free agents are available enough to run both tests.

I'm suspecting you don't have enough agents to run both.

JunHo Yoon
  • 41
  • 4
  • Thanks for the suggestion but i do have enough agents. 5 agents and im only running two tests with one agent. I saw in the system.conf file that the _controller.max_concurrent_test=10_ commented out so I uncommented that and restarted the controller but it still doesnt work – dragosb Apr 21 '16 at 09:00
  • Should I also restart the agent? I guess system.conf is used only by the controller and not the agents – dragosb Apr 21 '16 at 09:00
  • Is there any other possible issue that I should look for? – dragosb Apr 21 '16 at 10:33
  • I'm suspecting you have installed the private agent for each users. private agent is belong to specific user and only the specified user can use these agent. http://www.cubrid.org/wiki_ngrinder/entry/private-agent – JunHo Yoon Apr 23 '16 at 08:22
  • I dont have any private agents. In agent.conf _agent.region_ is commented out. – dragosb Apr 25 '16 at 08:58
0

You can run many scripts using one agent only . I would divide agents based on transaction groups and not on scripts.

Inside grinder there is parallel.py .I have used this only before to run scripts in parallel.

See this link https://github.com/DealerDotCom/grinder/blob/master/grinder/examples/parallel.py

from net.grinder.script.Grinder import grinder

scripts = ["TestScript1", "TestScript2", "TestScript3"]

Ensure modules are initialised in the process thread.

for script in scripts: exec("import %s" % script)

def createTestRunner(script): exec("x = %s.TestRunner()" % script) return x

class TestRunner: def init(self): tid = grinder.threadNumber

    if tid % 4 == 2:
        self.testRunner = createTestRunner(scripts[1])
    elif tid % 4 == 3:
        self.testRunner = createTestRunner(scripts[2])
    else:
        self.testRunner = createTestRunner(scripts[0])

# This method is called for every run.
def __call__(self):
    self.testRunner()
user666
  • 1,104
  • 12
  • 20