4/16/16

Element of test plan

Thread Group
Thread Group elements are the beginning points of your test plan. As the name suggests, the thread group elements control the number of threads JMeter will use during the test. We can also control the following via the Thread Group −
Setting the number of threads
Setting the ramp-up time
Setting the number of test iterations
The Thread Group Control Panel looks like this −

The Thread Group Panel holds the following components −
1. Action to be taken after a Sampler error − In case any error occurs during test execution, you may let the test either −
o Continue to the next element in the test
o Stop Thread to stop the current Thread.
o Stop Test completely, in case you want to inspect the error before it continues running.

2. Number of Threads − Simulates the number of users or connections to your server application.
3. Ramp-Up Period Defines how long it will take JMeter to get all threads running.
4. Loop Count − Defines the number of times to execute the test.
5. Scheduler checkbox − Once selected, the Scheduler Configuration section appears at the bottom of the control panel.
6. Scheduler Configuration − You can configure the start and end time of running the test. 


Samplers
Samplers allow JMeter to send specific types of requests to a server. They simulate a user request for a page from the target server. For example, you can add a HTTP Request sampler if you need to perform a POST, GET, or DELETE on a HTTP service.

Logical Controller
Logic Controllers let you control the order of processing of Samplers in a Thread. Logic controllers can change the order of a request coming from any of their child elements. Some examples are – For Each Controller, While Controller, Loop Controller, IF Controller, Run Time Controller, Interleave Controller, Throughput Controller, and Run Once Controller.
Listeners
Listeners let you view the results of Samplers in the form of tables, graphs, trees, or simple text in some log files. They provide visual access to the data gathered by JMeter about the test cases as a Sampler component of JMeter is executed.
Listeners can be added anywhere in the test, including directly under the test plan. They will collect data only from elements at or below their level.
Timers
By default, a JMeter thread sends requests without pausing between each sampler. This may not be what you want. You can add a timer element which allows you to define a period to wait between each request.
Assertions
Assertions allow you to include some validation test on the response of your request made using a Sampler. Using assertions you can prove that your application is returning the correct data. JMeter highlights when an assertion fails.
Configuration Elements
Configuration Elements allow you to create defaults and variables to be used by Samplers. They are used to add or modify requests made by Samplers.
They are executed at the start of the scope of which they are part, before any Samplers that are located in the same scope. Therefore, a Configuration Element is accessed only from inside the branch where it is placed.
Pre-processor Elements
A pre-processor element is something that runs just before a sampler executes. They are often used to modify the settings of a Sample Request just before it runs, or to update variables that are not extracted from response text.
Post-processor Elements
A post-processor executes after a sampler finishes its execution. This element is most often used to process the response data, for example, to retrieve a particular value for later use.

No comments:

Post a Comment