[Jakarta-jmeter Wiki] Update of "FrontPage" by brettcav e

2010-02-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" 
for change notification.

The "FrontPage" page has been changed by brettcave.
The comment on this change is: description on logging in / creating account is 
incorrect, there is no UserPreferences in top right (its "login" in top left).
http://wiki.apache.org/jakarta-jmeter/FrontPage?action=diff&rev1=100&rev2=101

--

  
  || 
[[http://jakarta.apache.org/jmeter/|{{http://jakarta.apache.org/jmeter/images/logo.jpg}}]]
 || '''Apache JMeter''' is a 100% pure Java desktop application designed to 
load test functional behavior and measure performance. It was originally 
designed for testing Web Applications but has since expanded to other test 
functions. ||
  || '''Current Version:''' 2.3.4 || 
[[http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi|Download]] 
[[http://issues.apache.org/bugzilla/|JMeter Bugzilla]] 
[[http://issues.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=JMeter|Open
 JMeter Bugs]] [[http://jakarta.apache.org/site/mail2.html#JMeter|Mailing 
Lists]] [[http://www.nabble.com/JMeter-f296.html|Archive Search]]||
-   To edit pages, visit UserPreferences at the top-right of any page to 
create a user profile and login. Everyone is encouraged to help us keep 
JMeter's Wiki up to date. ||
+   To edit pages, visit 
[[http://wiki.apache.org/jakarta-jmeter/FrontPage?action=login|Login]] at the 
top-left of any page to create a user profile and login. Everyone is encouraged 
to help us keep JMeter's Wiki up to date. ||
   
  
  == User Pages ==

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



[Jakarta-jmeter Wiki] Update of "JMeterAutomatedRemoteTes ting" by brettcave

2010-02-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" 
for change notification.

The "JMeterAutomatedRemoteTesting" page has been changed by brettcave.
http://wiki.apache.org/jakarta-jmeter/JMeterAutomatedRemoteTesting

--

New page:
This document shows how you can use JMeter to perform more automated 
(non-interactive) testing.

= Requirements =
This article assumes that you:
* know the basics of JMeter
* have an existing test plan
* have a bit of knowledge on using variables in test plans
* have touched on remote testing (from GUI is fine)

= Set up =
# In your existing test plan, make sure that any variations in testing make use 
of variables. For example, if running a HTTP sampler, use HTTP Request Defaults 
to specify a host as "${__P(targetHost)}". Other useful places for variables 
might include number of threads, ramp-up period or scheduler duration in a 
thread group, using a format of ${__P(threadgroup.threads,500)}  (The __P 
function is shorthand for __parameter. See the userguide for more info on using 
this parameter).
# Save your test plan and properties file to a directory.
# Create a properties file containing all your variables. E.g. 
mytest.properties could contain threadgroup.threads=100, 
targetHost=my-target-host.com
# The test plan does not need Listeners, as this will be configured via 
parameters. This will improve performance on the testing.
# Run the test mode in stand-alone mode (i.e. no remote servers):   `jmeter -n 
-t load_test.jmx -l load_test_report.jtl -q mytest.properties -j mytest.log`
# 1 small piece of functionality missing is the ability to set global variables 
from a property file. the "-q" parameter defines an additional property file, 
which is the equivalent of setting properties for the contents of the file 
using the -J parameter. This parameters are not global however, as would be set 
by the -G parameter. the following bash script (if your using Linux) would help 
with converting a properties file to global properties:
{{{
for var in `grep -vE "^(#|$)" mytest.properties`; do
  GLOBAL_VARS="-G${var} ${GLOBAL_VARS}"
done
}}}

This is a relatively simple bash expansion, and will break if there are any 
spaces in variable names or values (e.g. test.description="My Test" - the space 
would break the bash for loop.)

# On all client machines, start up JMeter server, ensuring that firewall is not 
blocking connections (clients must all be on the same subnet). 
# On JMeter controller (the host initializing the test), run the test with the 
-R parameter (can be run using -r and specfiying hosts in jmeter properties 
file):
`jmeter -n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j 
mytest.log -R remotehost1,remotehost2 ${GLOBAL_VARS}`

Note that load injection to targets will be a increased as a ratio of number of 
threads per thread group multiplied by number of client machines.

A script similar to the following could be used to start up jmeter:
{{{
#!/bin/sh

loadtest="myloadtest"
GLOBAL_VARS=""
REPORT_DIR=/tmp
JMETER_PROPERTIES=jmeter.properties
JMETER_CUSTOM_PROPERTIES=mytest.properties
# If set as an environment var, then use it, otherwise leave it unset.
HOST_LIST=${HOST_LIST:+"-R ${HOST_LIST}"}

for var in `grep -vE "^#|^$" ${JMETER_CUSTOM_PROPERTIES}`; do
GLOBAL_VARS="-G${var} ${GLOBAL_VARS}"
done

if [ -f ${loadtest}.jmx ]; then
echo "Running ${loadtest} with:"
echo -e "   ---
$JMETER -n
-t ${loadtest}.jmx
-l ${REPORT_DIR}/${loadtest}.jtl
-p ${JMETER_PROPERTIES}
${GLOBAL_VARS}
${HOST_LIST}
-j ${REPORT_DIR}/_${loadtest}.log
---"
$JMETER -n \
-t ${loadtest}.jmx \
-l ${REPORT_DIR}/${loadtest}.jtl \
-p ${JMETER_PROPERTIES} \
${GLOBAL_VARS} \
${HOST_LIST} \
-j ${REPORT_DIR}/_${loadtest}.log
else
echo "Could not find test plan for ${loadtest}"
fi
}}}



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



[Jakarta-jmeter Wiki] Update of "JMeterAutomatedRemoteTes ting" by brettcave

2010-02-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" 
for change notification.

The "JMeterAutomatedRemoteTesting" page has been changed by brettcave.
http://wiki.apache.org/jakarta-jmeter/JMeterAutomatedRemoteTesting?action=diff&rev1=1&rev2=2

--

  
  = Requirements =
  This article assumes that you:
- * know the basics of JMeter
+  * know the basics of JMeter
- * have an existing test plan
+  * have an existing test plan
- * have a bit of knowledge on using variables in test plans
+  * have a bit of knowledge on using variables in test plans
- * have touched on remote testing (from GUI is fine)
+  * have touched on remote testing (from GUI is fine)
  
  = Set up =
- # In your existing test plan, make sure that any variations in testing make 
use of variables. For example, if running a HTTP sampler, use HTTP Request 
Defaults to specify a host as "${__P(targetHost)}". Other useful places for 
variables might include number of threads, ramp-up period or scheduler duration 
in a thread group, using a format of ${__P(threadgroup.threads,500)}  (The __P 
function is shorthand for __parameter. See the userguide for more info on using 
this parameter).
+  * In your existing test plan, make sure that any variations in testing make 
use of variables. For example, if running a HTTP sampler, use HTTP Request 
Defaults to specify a host as "${__P(targetHost)}". Other useful places for 
variables might include number of threads, ramp-up period or scheduler duration 
in a thread group, using a format of ${__P(threadgroup.threads,500)}  (The __P 
function is shorthand for __parameter. See the userguide for more info on using 
this parameter).
- # Save your test plan and properties file to a directory.
+  * Save your test plan and properties file to a directory.
- # Create a properties file containing all your variables. E.g. 
mytest.properties could contain threadgroup.threads=100, 
targetHost=my-target-host.com
+  * Create a properties file containing all your variables. E.g. 
mytest.properties could contain threadgroup.threads=100, 
targetHost=my-target-host.com
- # The test plan does not need Listeners, as this will be configured via 
parameters. This will improve performance on the testing.
+  * The test plan does not need Listeners, as this will be configured via 
parameters. This will improve performance on the testing.
- # Run the test mode in stand-alone mode (i.e. no remote servers):   `jmeter 
-n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j mytest.log`
+  * Run the test mode in stand-alone mode (i.e. no remote servers):   `jmeter 
-n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j mytest.log`
- # 1 small piece of functionality missing is the ability to set global 
variables from a property file. the "-q" parameter defines an additional 
property file, which is the equivalent of setting properties for the contents 
of the file using the -J parameter. This parameters are not global however, as 
would be set by the -G parameter. the following bash script (if your using 
Linux) would help with converting a properties file to global properties:
+  * 1 small piece of functionality missing is the ability to set global 
variables from a property file. the "-q" parameter defines an additional 
property file, which is the equivalent of setting properties for the contents 
of the file using the -J parameter. This parameters are not global however, as 
would be set by the -G parameter. the following bash script (if your using 
Linux) would help with converting a properties file to global properties:
  {{{
  for var in `grep -vE "^(#|$)" mytest.properties`; do
GLOBAL_VARS="-G${var} ${GLOBAL_VARS}"
@@ -24, +24 @@

  
  This is a relatively simple bash expansion, and will break if there are any 
spaces in variable names or values (e.g. test.description="My Test" - the space 
would break the bash for loop.)
  
- # On all client machines, start up JMeter server, ensuring that firewall is 
not blocking connections (clients must all be on the same subnet). 
+  * On all client machines, start up JMeter server, ensuring that firewall is 
not blocking connections (clients must all be on the same subnet). 
- # On JMeter controller (the host initializing the test), run the test with 
the -R parameter (can be run using -r and specfiying hosts in jmeter properties 
file):
+  * On JMeter controller (the host initializing the test), run the test with 
the -R parameter (can be run using -r and specfiying hosts in jmeter properties 
file):
  `jmeter -n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j 
mytest.log -R remotehost1,remotehost2 ${GLOBAL_VARS}`
  
  Note that load injection to targets will be a increased as a ratio of number 
of threads per thread group multiplied by number of client machines.
@@ -69, +69 @@

  fi
  }}}
  
- 

--

[Jakarta-jmeter Wiki] Update of "JMeterAutomatedRemoteTes ting" by brettcave

2010-02-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" 
for change notification.

The "JMeterAutomatedRemoteTesting" page has been changed by brettcave.
http://wiki.apache.org/jakarta-jmeter/JMeterAutomatedRemoteTesting?action=diff&rev1=2&rev2=3

--

  
  = Requirements =
  This article assumes that you:
+ 
   * know the basics of JMeter
   * have an existing test plan
   * have a bit of knowledge on using variables in test plans
@@ -16, +17 @@

   * The test plan does not need Listeners, as this will be configured via 
parameters. This will improve performance on the testing.
   * Run the test mode in stand-alone mode (i.e. no remote servers):   `jmeter 
-n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j mytest.log`
   * 1 small piece of functionality missing is the ability to set global 
variables from a property file. the "-q" parameter defines an additional 
property file, which is the equivalent of setting properties for the contents 
of the file using the -J parameter. This parameters are not global however, as 
would be set by the -G parameter. the following bash script (if your using 
Linux) would help with converting a properties file to global properties:
+ 
  {{{
  for var in `grep -vE "^(#|$)" mytest.properties`; do
GLOBAL_VARS="-G${var} ${GLOBAL_VARS}"
  done
  }}}
- 
  This is a relatively simple bash expansion, and will break if there are any 
spaces in variable names or values (e.g. test.description="My Test" - the space 
would break the bash for loop.)
  
-  * On all client machines, start up JMeter server, ensuring that firewall is 
not blocking connections (clients must all be on the same subnet). 
+  * On all client machines, start up JMeter server, ensuring that firewall is 
not blocking connections (clients must all be on the same subnet).
   * On JMeter controller (the host initializing the test), run the test with 
the -R parameter (can be run using -r and specfiying hosts in jmeter properties 
file):
+ 
  `jmeter -n -t load_test.jmx -l load_test_report.jtl -q mytest.properties -j 
mytest.log -R remotehost1,remotehost2 ${GLOBAL_VARS}`
  
  Note that load injection to targets will be a increased as a ratio of number 
of threads per thread group multiplied by number of client machines.
  
- A script similar to the following could be used to start up jmeter:
+ A bash script similar to the following could be used to start up jmeter 
(called jmeter_test_wrapper.sh for example):
+ 
  {{{
  #!/bin/sh
  
@@ -43, +46 @@

  HOST_LIST=${HOST_LIST:+"-R ${HOST_LIST}"}
  
  for var in `grep -vE "^#|^$" ${JMETER_CUSTOM_PROPERTIES}`; do
-   GLOBAL_VARS="-G${var} ${GLOBAL_VARS}"
+ GLOBAL_VARS="-G${var} ${GLOBAL_VARS}"
  done
  
  if [ -f ${loadtest}.jmx ]; then
-   echo "Running ${loadtest} with:"
+ echo "Running ${loadtest} with:"
-   echo -e "   ---
-   $JMETER -n
-   -t ${loadtest}.jmx
+ echo -e "   ---
+ $JMETER -n
+ -t ${loadtest}.jmx
-   -l ${REPORT_DIR}/${loadtest}.jtl
+ -l ${REPORT_DIR}/${loadtest}.jtl
-   -p ${JMETER_PROPERTIES}
-   ${GLOBAL_VARS}
-   ${HOST_LIST}
+ -p ${JMETER_PROPERTIES}
+ ${GLOBAL_VARS}
+ ${HOST_LIST}
-   -j ${REPORT_DIR}/_${loadtest}.log
+ -j ${REPORT_DIR}/_${loadtest}.log
-   ---"
+ ---"
-   $JMETER -n \
-   -t ${loadtest}.jmx \
+ $JMETER -n \
+ -t ${loadtest}.jmx \
-   -l ${REPORT_DIR}/${loadtest}.jtl \
+ -l ${REPORT_DIR}/${loadtest}.jtl \
-   -p ${JMETER_PROPERTIES} \
-   ${GLOBAL_VARS} \
-   ${HOST_LIST} \
+ -p ${JMETER_PROPERTIES} \
+ ${GLOBAL_VARS} \
+ ${HOST_LIST} \
-   -j ${REPORT_DIR}/_${loadtest}.log
+ -j ${REPORT_DIR}/_${loadtest}.log
  else
-   echo "Could not find test plan for ${loadtest}"
+ echo "Could not find test plan for ${loadtest}"
  fi
  }}}
+ For a local test, you could run: `./jmeter_test_wrapper.sh`
+ For a remote test, it can be modified as 
`HOST_LIST="192.168.1.10,192.168.1.12" ./jmeter_test_wrapper.sh`
+ Now all you need to do is make sure the servers are running and add the above 
command into scheduler.
  

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org