1. download grinder
2. download jython
3. unzip grinder and jython
4. create "setGrinderEnv.cmd" file
{{
set GRINDERPATH=D:\grinder-3.2 # grinder path
set JYTHON_HOME=D:\jython2.2.1 # jython path
set GRINDERPROPERTIES=%GRINDERPATH%\examples\grinder.properties # properties file path
set CLASSPATH="%JYTHON_HOME%\jython.jar" # jython jar file path
set CLASSPATH=%CLASSPATH%;%GRINDERPATH%\lib\grinder.jar # grinder jar file path
set JAVA_HOME="C:\Program Files\Java\jdk1.5.0_16" # java path
PATH=%JAVA_HOME%\bin;%PATH%
}}
5. create "startAgent.cmd" file
{{
pushd ..
call bin\setGrinderEnv.cmd #
echo %CLASSPATH%
java -cp %CLASSPATH% net.grinder.Grinder %GRINDERPROPERTIES%
popd
}}
6. create "startConsole.cmd" file
{{
call setGrinderEnv.cmd
echo %CLASSPATH%
java -cp %CLASSPATH% net.grinder.Console
}}
7. create "startProxy.cmd" file
{{
call setGrinderEnv.cmd
java -cp %CLASSPATH% net.grinder.TCPProxy -console -http > ..\grinder.py
}}
8. Record test scenario
a. open command prompt, go to the grinder path "D:\grinder-3.2\bin"
b. enter this "D:\grinder-3.2\bin> startProxy.cmd"
c. open browser and set the proxy setting from tools " Tools > options > Advanced > Network > settings"
i).select manual proxy settings option
ii).Http proxy > localhost : 8001
iii).SSL proxy > localhost : 8001
iv).select "SOCKSv5
v).No proxy for > localhost, 127.0.0.1
vi).click "ok"
vii).click "OK"
d. enter url for your application
e. do some actions in your application
f. click "stop" at recording console
9. It will generate a file with recording script like "grinder.py" in the grinder folder
10. copy this file "grinder.py " in to the example folder
11. open the "D:\grinder-3.2\examples\grinder.properties" file
1. set the script file name at "grinder.script = grinder.py "
2. set the processors "grinder.processes = 2"
3. set the threads "grinder.threads = 10"
4. set the run times "grinder.runs = 10 "
5. set the grinder console host name "grinder.consoleHost = 192.168.2.65"
6.
12. start console
i). open the command prompt and go to the grinder path like "D:\grinder-3.2\bin"
ii). enter "D:\grinder-3.2\bin>startConsole.cmd "
12. start Agent
i). open the command prompt and go to the grinder path like "D:\grinder-3.2\bin"
ii). enter "D:\grinder-3.2\bin>startAgent.cmd "
13. go to the console window -> set the direcotory
14. go to the console window -> distribute files
15. go to the console window -> click strat process
2. download jython
3. unzip grinder and jython
4. create "setGrinderEnv.cmd" file
{{
set GRINDERPATH=D:\grinder-3.2 # grinder path
set JYTHON_HOME=D:\jython2.2.1 # jython path
set GRINDERPROPERTIES=%GRINDERPATH%\examples\grinder.properties # properties file path
set CLASSPATH="%JYTHON_HOME%\jython.jar" # jython jar file path
set CLASSPATH=%CLASSPATH%;%GRINDERPATH%\lib\grinder.jar # grinder jar file path
set JAVA_HOME="C:\Program Files\Java\jdk1.5.0_16" # java path
PATH=%JAVA_HOME%\bin;%PATH%
}}
5. create "startAgent.cmd" file
{{
pushd ..
call bin\setGrinderEnv.cmd #
echo %CLASSPATH%
java -cp %CLASSPATH% net.grinder.Grinder %GRINDERPROPERTIES%
popd
}}
6. create "startConsole.cmd" file
{{
call setGrinderEnv.cmd
echo %CLASSPATH%
java -cp %CLASSPATH% net.grinder.Console
}}
7. create "startProxy.cmd" file
{{
call setGrinderEnv.cmd
java -cp %CLASSPATH% net.grinder.TCPProxy -console -http > ..\grinder.py
}}
8. Record test scenario
a. open command prompt, go to the grinder path "D:\grinder-3.2\bin"
b. enter this "D:\grinder-3.2\bin> startProxy.cmd"
c. open browser and set the proxy setting from tools " Tools > options > Advanced > Network > settings"
i).select manual proxy settings option
ii).Http proxy > localhost : 8001
iii).SSL proxy > localhost : 8001
iv).select "SOCKSv5
v).No proxy for > localhost, 127.0.0.1
vi).click "ok"
vii).click "OK"
d. enter url for your application
e. do some actions in your application
f. click "stop" at recording console
9. It will generate a file with recording script like "grinder.py" in the grinder folder
10. copy this file "grinder.py " in to the example folder
11. open the "D:\grinder-3.2\examples\grinder.properties" file
1. set the script file name at "grinder.script = grinder.py "
2. set the processors "grinder.processes = 2"
3. set the threads "grinder.threads = 10"
4. set the run times "grinder.runs = 10 "
5. set the grinder console host name "grinder.consoleHost = 192.168.2.65"
6.
12. start console
i). open the command prompt and go to the grinder path like "D:\grinder-3.2\bin"
ii). enter "D:\grinder-3.2\bin>startConsole.cmd "
12. start Agent
i). open the command prompt and go to the grinder path like "D:\grinder-3.2\bin"
ii). enter "D:\grinder-3.2\bin>startAgent.cmd "
13. go to the console window -> set the direcotory
14. go to the console window -> distribute files
15. go to the console window -> click strat process
super
ReplyDelete