Skip to content

SIP User Documentation Chapter 2

Vincent Hérilier edited this page Nov 26, 2019 · 3 revisions

SIP JMeter elements

PREVIOUS CHAPTER | TOC | NEXT CHAPTER


The following SIP specific elements are available in the GUI when the SIP plug-in is installed:

  • SIP node: A Config Element that creates and configures the connection to the SIP network.
  • SIPCommandSampler: A Sampler that sends SIP messages through a SIP node and checks whether a specific SIP message was received by a SIP node. The following SIP message-related actions are possible
    • Send a request
    • Check that a response was received
    • Check that a request was received
    • Send a response

Config Elements

SIP node is a Config Element that can be added to a Test Plan.

Config Element is a Apache JMeter configuration element that is started at the beginning of test execution. Configuration elements store the context that is valid throughout the test execution and this context is shared by all the other Apache JMeter elements.

Related concepts

See Adding and configuring SIP nodes page.

Add the SIP node element to your Test Plan as you add other Config Elements in Apache JMeter. Define the SIP Node name, SIP Node context parameters, and SIP Stack endpoint parameters.

Related information

Thread Groups

Thread Group is a Apache JMeter element that can be used to start several test threads with a loop count of one or more for each thread.

Threads perform actions in parallel, completely independently from each other. The only relationship between the threads within a Thread Group is that a common program is defined for them, but potentially with different parameters.

Related information

Samplers, Listeners and Assertions

SIPCommandSampler is a sampler that can be added to Thread Groups. Sampler results can be displayed through Apache JMeter native elements, for example, through Listener elements.

A thread contains samplers that are executed in sequence. Samplers must be added to the Thread Groups of a Test Plan to have actions that have a result. The scenario continues to run until there is an action to do. This is determined by Thread Group settings and by sampler settings.

Each sampler returns a result structure that can be used in two ways:

If the result structure returned by a sampler is related to the sending or reception of a SIP request or response, the SIP message content is included as a string in the response message.

Related concepts

See Adding and configuring SIP samplers page.

Add SIPCommandSampler elements to your Test Plan as you add other sampler elements in Apache JMeter. After defining the sampler name, SIP node name, and command direction, specify a request method or response code and the SIP message parameters that you want to send or check (depending on command direction).

See Result structure produced by SIP specific samplers page.

You can check the XML result structure of SIP specific samplers both in GUI and command line mode. You can change the format to CSV but note that the CSV output cannot be opened in GUI mode.

Related information

Logic Controllers

Logic controller, for example, Transaction Controller, [Simple Controller]j[SC], and Once Only Controller are native Apache JMeter elements to group samplers within a Thread Group.

It is recommended to use Logic controller with Apache JMeter for two reasons:

  • The Test Plan tree structure can provide a clear overview of the test cases and other test elements that are included in the Test Plan. Use the Name and Comments fields of the Logic controller to define the purpose of each sampler group.
  • It is easy to save and reuse a group of samplers.
    • To reuse a group of samplers in another Test Plan, right-click a Logic controller in the Test Plan tree structure, and select Save Selection As....
    • To reuse a group of samplers within the same Test Plan, select a Logic controller in the Test Plan tree structure, press CTRL-C to copy, then press CTRL-V to paste it somewhere else in the tree structure.

If you define a Loop Count of 2 or more in a Thread Group, but you want to execute some samplers only once per thread, use a Once Only Controller instead of a Simple Controller.

Related information

Timers

Timers, like Constant Timer, are native Apache JMeter elements that are used to delay the time when a specific sampler is processed. Timers are processed before the sampler they are added to.

To simulate both the caller and the callee to test a third system, you can use Constant Timer elements to synchronize the two scenarios. However, it is important to consider the retransmission mechanism defined in the SIP protocol when configuring the timers. If you add timers to samplers that send 100 or 180 SIP response messages at the callee side, it is recommended to specify a small value for the timeout, for example, a thread delay of 100 milliseconds, so that the test scenario is completed fast enough (without generating retransmission of the INVITE message on the other side).

The following specific parameters are also related to the timing of scenarios:

  • SIP message reception timeout configured at SIP node level
  • reception timeout configured at SIPCommandSampler level
Related concepts

See Adding and configuring SIP nodes page.

Add the SIP node element to your Test Plan as you add other Config Elements in Apache JMeter. Define the SIP Node name, SIP Node context parameters, and SIP Stack endpoint parameters.

See Adding and configuring SIP samplers page.

Add SIPCommandSampler elements to your Test Plan as you add other sampler elements in Apache JMeter. After defining the sampler name, SIP node name, and command direction, specify a request method or response code and the SIP message parameters that you want to send or check (depending on command direction).

Related information

PREVIOUS CHAPTER | TOC | NEXT CHAPTER