Thursday, July 1, 2010

Jmeter tutorial

 Installation


To install a release build, simply unzip the zip/tar file into the directory where you want JMeter to be installed. Provided that you have a JRE/JDK correctly installed and the JAVA_HOME environment variable set, there is nothing more for you to do.




The installation directory structure should look something like this (for version 2.3.1):

jakarta-jmeter-2.3.1
jakarta-jmeter-2.3.1/bin
jakarta-jmeter-2.3.1/docs
jakarta-jmeter-2.3.1/extras
jakarta-jmeter-2.3.1/lib/
jakarta-jmeter-2.3.1/lib/ext
jakarta-jmeter-2.3.1/lib/junit
jakarta-jmeter-2.3.1/printable_docs

------------------------------------------------


To run JMeter, run the jmeter.bat (for Windows) or jmeter (for Unix) file.



There are some additional scripts in the bin directory that you may find useful. Windows script files (the .CMD files require Win2K or later):

    * jmeter.bat - run JMeter (in GUI mode by default)
    * jmeter-n.cmd - drop a JMX file on this to run a non-GUI test
    * jmeter-n-r.cmd - drop a JMX file on this to run a non-GUI test remotely
    * jmeter-t.cmd - drop a JMX file on this to load it in GUI mode
    * jmeter-server.bat - start JMeter in server mode

The environment variable JVM_ARGS can be used to override JVM settings in the jmeter.bat script. For example:

set JVM_ARGS="-Xms1024m -Xmx1024m -Dpropname=propvalue"
jmeter -t test.jmx ...





Unix script files; should work on most Linux/Unix systems:

    * jmeter - run JMeter (in GUI mode by default). Defines some JVM settings which may not work for all JVMs.
    * jmeter-server - start JMeter in server mode (calls jmeter script with appropriate parameters)
    * jmeter.sh - very basic JMeter script with no JVM options specified.

It may be necessary to edit the jmeter shell script if some of the JVM options are not supported. The JVM_ARGS environment variable can be used to override or set additional JVM options, for example:

JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t test.jmx [etc.]


------------------------------------------------


Building a Test Plan::


A test plan describes a series of steps JMeter will execute when run. A complete test plan will consist of one or more Thread Groups, logic conrollers, sample generating controllers, listeners, timers, assertions, and configuration elements.

Adding elements to a test plan  can be done by right-clicking on an element in the tree.

The Test Plan object has a checkbox called "Functional Testing". If selected, it will cause JMeter to record the data returned from the server for each sample.


-------------------------------------------------

ThreadGroup::

Thread group elements are the beginning points of any test plan. All controllers and samplers must be under a thread group. Other elements, e.g. Listeners, may be placed directly under the test plan, in which case they will apply to all the thread groups. As the name implies, the thread group element controls the number of threads JMeter will use to execute your test. The controls for a thread group allow you to:

    * Set the number of threads
    * Set the ramp-up period
    * Set the number of times to execute the test.


--------------------------------------------------

Controllers::

    JMeter has two types of Controllers: Samplers and Logical Controllers. These drive the processing of a test.

    Samplers tell JMeter to send requests to a server. For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request. You can also customize a request by adding one or more Configuration Elements to a Sampler. For more information, see Samplers .

    Logical Controllers let you customize the logic that JMeter uses to decide when to send requests. For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Samplers. For more information, see Logical Controllers .

--------------------------------------------------

 Samplers::

Samplers tell JMeter to send requests to a server and wait for a response.

JMeter samplers include:

    * FTP Request
    * HTTP Request
    * JDBC Request
    * Java object request
    * LDAP Request
    * SOAP/XML-RPC Request
    * WebService (SOAP) Request

Remember to add a Listener to your test plan to view and/or store the results of your requests to disk.

If you are interested in having JMeter perform basic validation on the response of your request, add an Assertion  to the sampler. For example, in stress testing a web application, the server may return a successful "HTTP Response" code, but the page may have errors on it or may be missing sections. You could add assertions to check for certain HTML tags, common error strings, and so on. JMeter lets you create these assertions using regular expressions.

Monday, April 5, 2010

Three aspect for Business




Analysis part :: Anlaysing data based on Market requirement. Done by the analyst group.

Development/Production/Creation:: Based on the research, product is created. Done by the Finance/technical team.

Presentation:: The companies are created and sell goods/products/services. Done Sales team, marketing, Finance.

End User:: The product is consumed. The buyers, superset.


Note:: This is my assumption, correct me if i am wrong. 

ad