Tuesday, August 21, 2007

Working with STAF (part 2)

Well we have discussed some of the concepts of staf in post WAORKING WITH STAF. NOW we will have some thing interesting interaction by using JMeter.

Now let us know the concepts of Jmeter inorder to go further.

JMeter is a open source tool we can download from the site Apache Jmeter.
Jmeter is a performance tool used for finding the avg. response time, devaition etc parameters like the other tools load runner. The only use of the Jmeter is a open source and also it is a less memory eater when compared to the other tools.

NOW create a test plan according to the manual given in the Apache Jakarata site site itself, After creating a test plan save the file with desired name. LETs go to STAF now.

IF for suppose this file is in the remote system. we can execute this file and and the results can be obtained in our systems. INORDER to do this we have to give the trust levels to the remote systems. There are 5 trust levels, according to each trust level the access is differnet for the remote systems. After giving the trust level. Now we can execute the test plan by making a batch file.

In this Batch file we need the controller where the system we handle load generators where the test case is present, Well, i will make batch file very simple to understand and an idea how to execute the test plan by using the batch file.

REM set the controllers
REM set the load generators
REM set the plan

SET controller= webserver1
SET load = webserver2
SET plan=myplan.jmx

REM checking the STAF connecting to the remote systems

FOR %%H IN (%controller% %load%) DO STAF %%H PING PING

REM executing the test plan using jmeter

for %%H IN (%load%) Do staf %%H PROCESS START SHELL COMMAND C:\jmeter\bin\jmeter-n.cmd C:\jmeter\bin\myplan.jmx

REM copying the results from the remote system to our system

for %%H IN (%load%) Do staf %%H fs copy directory c:\jmeter\bin todirectory c:\logs\ tomachine %controller% EXT log CASEINSENSITIVE

This is a small batch file where we can use staf and make wonders.

1 comment:

Anonymous said...

yeah a nice blog to read ..even though the contents are less it has got lot of useful information..I feel that you could have added information about .You can test your knowledge in html by attending HTML Quiz .