Search This Blog

Sunday, 2 March 2014

SIPP(Invite.xml) as UAS Server mode



UAS  -  INVITE.xml :



<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- You will need to compile SIPp with OpenSSL support 'make ossl' to use this call scenario -->

<!-- Execute this script with SIPp using the following command assuming your UAS is 10.0.0.10 -->
<!-- Replace 10.0.0.10 with your SIP proxy’s address. The command will generate 10 calls (-r) per 10000 -->
<!-- milliseconds (-rp), max 100 concurrent calls (-l) and make a max of 100000 calls (-m) -->

<!-- ./sipp 10.0.0.10 -sf invite-auth-sdp-nomedia.xml -inf user-accounts.csv -m 100000 -l 100 -r 10 -rp 10000 -->

<scenario name="UAS INVITE">
 <recv request="INVITE" crlf="true">
      </recv>
 
   <!-- send 180 then trying if variable 3 is set -->
    <send>
    <![CDATA[

       SIP/2.0 180 Ringing
       [last_Via:]
       [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
    </send>

  <send retrans="500">
    <![CDATA[

       SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Type: application/sdp
      Content-Length: 136

      v=0
     o=user1 53655765 2353687637 IN IP4 127.0.0.1
      s=-
      t=0 0
      c=IN IP4 [media_ip]
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>
<recv request="ACK"
       optional="true"
        rtd="true"
       crlf="true">
  </recv>

  <recv request="BYE">
  </recv>

  <send>
    <![CDATA[

     SIP/2.0 200 OK
     [last_Via:]
      [last_From:]
     [last_To:];tag=[call_number]
     [last_Call-ID:]
     [last_CSeq:]
     Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
 </send>

  <!-- definition of the response time repartition table (unit is ms) -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms) -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>


</scenario>

Saturday, 18 January 2014

SIPp Scripts(Register.xml and Invite.xml)UAC

****SIPp Scripts*****:

Register UAC:

Register.csv :

Register.csv file should contain the User data in below format

SEQUENTIAL
1000;10.XXX.XXX.XX;[authentication username=1000 password=123456];




Register.xml:

Register.xml file should contain  below messages

<?xml version="1.0" encoding="ISO-8859-1" ?>

<scenario name="register_client">
  <send retrans="500">
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      To: <sip:[field0]@[field1]>
      Call-ID: [call_id]
      CSeq: 1 REGISTER
      Contact: sip:[field0]@[local_ip]:[local_port]
      Max-Forwards: 70
      Expires: 1800
      User-Agent: SIPp/Linux
      Content-Length: 0

    ]]>
  </send>

  <recv response="401" auth="true">
  </recv>

  <send retrans="500">
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      To: <sip:[field0]@[field1]>

      Call-ID: [call_id]
      CSeq: 2 REGISTER
      Contact: sip:[field0]@[local_ip]:[local_port]
      [authentication username=21613 password=123456]
      Max-Forwards: 70
      Expires: 1800
      User-Agent: SIPp/Linux
      Content-Length: 0

    ]]>
  </send>

  <recv response="200" rtd="true">
  </recv>
 
</scenario>



INVITE UAC :

Invite.CSV:

SEQUENTIAL
1000;10.XXX.XXX.XXX;[authentication username=1000 password=123456];1001;
  
INVITE.XML

Invite.xml should contain below message format 


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- You will need to compile SIPp with OpenSSL support 'make ossl' to use this call scenario -->

<!-- Execute this script with SIPp using the following command assuming your UAS is 10.0.0.10 -->
<!-- Replace 10.0.0.10 with your SIP proxy’s address. The command will generate 10 calls (-r) per 10000 -->
<!-- milliseconds (-rp), max 100 concurrent calls (-l) and make a max of 100000 calls (-m) -->

<!-- ./sipp 10.0.0.10 -sf invite-auth-sdp-nomedia.xml -inf user-accounts.csv -m 100000 -l 100 -r 10 -rp 10000 -->

<scenario name="UAC INvite    ">
  <send retrans="500" start_txn="invite">
    <![CDATA[

INVITE sip:[field3]@[field1]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
To: sut <sip:[field3]@[field1]:[remote_port]>
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: <sip:sipp@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
User-Agent: SIPp Tester UAC
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Content-Type: application/sdp
Content-Length: [len]

v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0
a=rtpmap:0 PCMU/8000


]]>
  </send>

  <recv response="100" optional="true" response_txn="invite">
  </recv>

  <recv response="180" optional="true" response_txn="invite">
  </recv>

 
  <recv response="200" rtd="true" rrs="true" response_txn="invite">
       
  </recv>

   <send ack_txn="invite">
    <![CDATA[

ACK sip:[field3]@[field1]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch-3]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
[last_To]
[routes]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: <sip:sipp@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
User-Agent: SIPp Tester UAC
Content-Length: 0

]]>
  </send>
 <pause milliseconds="10000"/>
 <send retrans="500">
    <![CDATA[
BYE sip:[field3]@[field1]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
[last_To]
Call-ID: [call_id]
CSeq: [cseq] BYE
Contact: <sip:sipp@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Performance Test
User-Agent: SIPp Tester UAC
Content-Length: 0
]]>
  </send>

  <recv response="200" crlf="true">
  </recv>

  <!-- definition of the response time repartition table (unit is ms) -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms) -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>


</scenario>




Video Tutorial SIPp:



Sunday, 5 January 2014

IMS (IP MULTIMEDIA SUBSYSTEM)

                                 IP MULTIMEDIA SUBSYSTEM (IMS)

Why do we need the IMS?
 
                              The Main idea of the IMS is to offer Internet services everywhere and at any time using cellular technologies. we need to further clarify what we mean by merging the Internet and the cellular worlds and what the real advantages of doing so are. To do that, we need to introduce the different domains in 3G networks, namely the circuit-switched domain and the packet -switched domain.
The circuit-switched domain is an evolution of the technology used in 2G networks.The circuits in this domain are optimized to transport voice and video, although they can also be used to transport instant messages. The current trend is to substitute it with more efficient packet-switch technology.
                             The packet-switched domain provides I access to the Internet. While 2G terminals can act as a modem to transmit IP packets over a circuit, 3G terminals  use native packet-switched technology to perform data communications. This way, data transmissions are much faster and the available bandwidth for Internet access increases dramatically.
                             Why do we need the IMS, if all the power of the Internet is already available for 3G users through the packet-switched domain? The answer is threefold: QoS (Quality of Service), charging, and integration of different services. One of the reasons for creating the IMS was to provide the QoS required for enjoying, rather than suffering, real-time multimedia sessions.
                               Another reason for creating the IMS was being able to charge multimedia sessions appropriately. A user involved in videoconference over the  packet-switched domain usually transfers a large amount of information (which consists mainly of encoded audio and video). Depending on the 3G operator, the transfer of such an amount of data may generate large expenses for the user, since operators typically charge by the number of bytes transferred. The IMS provides information about the service being invoked by the user, and with this information the operator decides whether to use a flat rate for the service, apply traditional time-based charging, apply QoS-based charging, or perform any new type of charging.
                               In addition, users have to be able to execute all their services when roaming as well as from their home networks. To achieve these goals the IMS uses Internet technologies and Internet protocols.
 

 

General Principles of the IMS Architecture

GSM has two different modes of operation: circuit-switched and packet-switched.
 
GSM circuit-switched : The GSM circuit-switched network uses circuit-switched technologies, which are also used in the PSTN (Public Switched Telephone Network).
Circuit-switched networks have two different planes:
 
 
 

Wednesday, 25 December 2013

Installing SIPp on Windows

SIPp on Windows:


Pre-Requisite Downloads:-

Download the following Installation files from the following links:

1)  https://cygwin.com/install.html  - Cygwin
2) https://sourceforge.net/projects/sipp/files/sipp/3.2/sipp-win32-3.2-setup.exe  -   Sipp-win-XXX.exe  

Procedure:

1)   First start installing Cygwin

2)  Select the root install directory (by default, C:/cygwin) and then click the button “Next”.Select local package directory and then click the button “Next”.

3)  Choose the connection method. In this example, “Direct Connection” is selected and then the button “Next”.

4) Choose a mirror site and the click the button “Next”. (chose http://ftp.daum.net).

5)  Enter the below packages in search box, default 3 to 4 list are displayed with Skip, select them and check the box under "bin" for all packages below:-

 Select packages to install .
 vim
 gcc-core
 gcc-g++
gcc
libncurses


6) Cygwin setup is done.

7)  After installation the folder structure is created     C://cygwin

8)  Run the sipp installation  file, during  installation select  the  location as   C://cygwin/Sipp

9)  After installation go to  C://cygwin/ and open the "terminal.bat"  file.
 
10)  gcc --version

11)  make --version

12) Browse http://www.openssl.org/         , Click the button “Source ”

13)  Download the latest version of OpenSSL.  Copy the downloaded OpenSSL source into “home” subfolder of the folder where “cygwin” is installed (eg, C:/cygwin/)

14 )  Run “cygwin” and then do the followings:
               $ cd /home $ tar zxvf openssl-x.x.x.tar.gz

15)         $ cd /home/openssl-x.x.x $  ./config

16)         $ cd /home/openssl-x.x.x $  make

17)       $ cd /home/openssl-x.x.x $ make test

18)      $ cd /home/openssl-x.x.x $ make install

19)     Check if the following three files show up  inside Openssl-XXX.X folder : –
               Execution file: openssl – Library files: libssl.a, libcrypto.a 32

20)  To compile SIPp on Windows with pcap (media support), you must:
  • Copy the WinPcap developer package to "C:\cygwin\lib\WpdPack"
  • Remove or rename "pthread.h" in "C:\cygwin\lib\WpdPack\Include", as it interfers with pthread.h from cygwin
21)  SIPp compiles under CYGWIN on Windows.

22) Goto   C://cygwin  and click   terminal.bat  file

23)   Compile
            # cd sipp
            # ./configure --with-pcap
            #  make pcapplay_ossl or make pcap

24) ./sipp XXX.XX.XX.XXX -sf REGISTER_client.xml -inf Register_client.csv -m 1



Installing SIPp on linux (Ubuntu)

SIPp:


SIPp is a  stress or performance test tool / traffic generator for the SIP protocol. It can work in both Scenarios (UAC /UAS) and establishes and releases multiple calls with the INVITE and BYE methods.It can also reads Custom XML scenario files describing from very simple to complex call flows. It features the dynamic display of statistics about running tests (call rate, round trip delay, and message statistics), periodic CSV statistics dumps, TCP and UDP over multiple sockets or multiplexed with retransmission management and dynamically adjustable call rates.

SIPp can also send media (RTP) traffic through RTP echo and RTP /pcap replay. Media can be audio or video.

SIPp can be used to test various real SIP equipment like SIP proxies, B2BUAs, SIP media servers, SIP/x gateways, SIP PBX, ... It is also very useful to emulate thousands of user agents calling your SIP system.


Installing SIPp on linux(Ubuntu):




Installing SIPP on Ubuntu 12.4 linux

 
  1. Run Terminal on Ubuntu
  1. Goto root  using su - and Pwd
  1. wget  http://sourceforge.net/projects/sipp/files/sipp/3.3/sipp-3.3.tar.gz/
  1. apt-get or Yum  intsall sipp-XXX-tar.gz
  1. cd Sipp-XX
  1. ls -l
  1.  apt-get install  openssl
  1. apt-get install  libssl-dev
  1. apt-get install  libssl1.0.0
  1. apt-get install  libssl0.9.8
  1. apt-get install  pcaputils
  1. apt-get install  libssl-dev
  1. apt-get install  libncursesw5-dev
  1. apt-get install  libncurses5-dev
  1. apt-get install  libcap-dev
  2. make pcapplay_ossl or make pcap
  1. ./sipp XXX.XX.XX.XXX -sf REGISTER_client.xml -inf Register_client.csv -m 1

If you get any error as below


tring to install sipp on ubuntu I get this error
qwerty at qwerty-desktop:~/sipp.2007-02-08$ sudo make
make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` sipp
make[1]: Entering directory `/home/qwerty/sipp.2007-02-08'
gcc   -D__LINUX -pthread -D__3PCC__       -I. -I/opt/openssl/include  -c -o scenario.o scenario.cpp
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
make[1]: *** [message.o] Error 127
make[1]: Leaving directory `/home/qwerty/sipp.2007-02-08'
make: *** [all] Error 2




use these commands

sudo apt-get install -f 
sudo apt-get remove libncurses5-dev libncurses5 libtinfo5 ncurses-bin 
sudo apt-get update 
sudo apt-get upgrade 
sudo apt-get install build-essential linux-image linux-image-generic libncurses5-dev libncurses5







Friday, 22 November 2013

Performance Testing ...


1 Objective and Scope


The primary aim of this document is to highlight key considerations in Performance Testing and to provide an insight into the rigor and depth of performance testing


2 Performance Testing

Performance Testing can be viewed as the systematic process of collecting and monitoring the results of system usage and analyzing them to aid system improvement towards desired results.
As part of the performance testing process, one needs to gather statistical information, examine logs of system state histories, determine system performance under natural and artificial conditions and alter system modes of operation.
Performance testing complements functional testing. Functional testing can validate proper functionality under correct usage and proper error handling under incorrect usage. It cannot, however, tell how much load an application can handle before it breaks or performs improperly. Finding the breaking points and performance bottlenecks, as well as identifying functional errors that only occur under stress requires performance testing.

The purpose of Performance testing is to demonstrate that
• The application processes required transaction volumes within specified response times in a real-time production database (Speed).
• The application can handle various user load scenarios (stresses), ranging from a sudden load “spike” to a persistent load “soak” (Scalability).
• The application is consistent in availability and functional integrity (Stability).
• Determination of minimum configuration that will allow the system to meet the formal stated performance expectations of stakeholders

Basis for inclusion in Load Test
High frequency transactions: The most frequently used transactions have the potential to impact the performance of all of the other transactions if they are not efficient.
Mission Critical transactions The more important transactions that facilitate the core objectives of the system should be included, as failure under load of these transactions has, by definition, the greatest impact.
Read Transactions: At least one READ ONLY transaction should be included, so that performance of such transactions can be differentiated from other more complex transactions.
Update Transactions At least one update transaction should be included so that performance of such transactions can be differentiated from other transactions.

2.1 Types of Performance Testing

Benchmark Testing:
The objective of Benchmark tests is to determine end-to-end timing of various critical business processes and transactions while the system is under low load with a production sized database.
The best time to execute benchmark tests is at the earliest opportunity. Developing performance test scripts at such an early stage provides opportunity to identify and remedy serious performance problems and expectations before load testing commences.
A key indicator of the quality of a benchmark test is its repeatability. That is, the re-execution of a performance test should give the same set of results. If the results are not the same each time, differences in results cannot be attributed to changes in the application, configuration or environment being tested.

Stress Tests:
Stress tests have one primary objective, and that is to determine the maximum load under which a system fails, and how it fails.
It is important to know in advance if a ‘stress’ situation will result in catastrophic system failure or if all components of the system simply ‘just go really slow’. Catastrophic failures often require the restarting of various infrastructures and contribute to downtime, stressful work environments for support staff and management, as well as possible financial loss and breaching of SLAs.

Targeted Infrastructure Tests:
 
The objective of Targeted Infrastructure tests is to individually test isolated areas of an end-to-end system configuration. This type of testing would include communications infrastructure such as:

-Load balancers;
-Web servers;
-Applications servers;
-Databases.

Targeted Infrastructure testing allows for the identification of any performance issues that would fundamentally limit the overall ability of a system to deliver at a given performance level. Targeted Infrastructure testing separately generates load on each component of an end-to-end system, measuring the response of each component under load.
Each test can be simple, focusing specifically upon the individual component being tested. It is often wise to execute Targeted Infrastructure tests upon isolated components prior to Load or Stress testing as it is much easier to identify (and quicker to rectify) performance issues in this situation rather than in a full end-to-end test.

Soak Tests (Endurance Testing):

Objective of soak testing is to identify any performance problems that may appear after a system has been running at a high level for an extended period of time. It is possible that a system may ‘stop’ working after a certain number of transactions have been processed, maybe due to:

-Serious memory leaks that would eventually result in a memory crisis;
-Failure to close connections between tiers of a multi-tiered system which could halt some or all modules of a system;
-Failure to close database cursors under some conditions which could eventually result in the entire systems stalling;
-Gradual degradation in response time of some function as internal data structures become less efficient during a long high intensity test.

Volume Tests:

Volume tests are tests directly relating to throughput, and are usually associated with the testing of ‘messaging’, ‘batch’ or ‘conversion’ type processing situations.

The objectives of Volume tests are:
- To determine throughput associated with a specific process or transaction;
- To determine the ‘capacity drivers’ associated with a specific process or transaction.
Volume testing a system involves the focusing of throughput through a system function (say, in bytes) rather than response time of a system function (say, in seconds).

It is important when designing Volume tests that the capacity drivers are identified prior to the execution of the Volume testing to ensure meaningful results are recorded. Capacity drivers in a batch processing function could be:

Record Types: The record types contained within one specific batch job run may require significant CPU processing while other record types may invoke substantial database and disk activity. Some batch processing function can also contain aggregation processing, and the mix of data contained within a batch job can significantly impact the processing requirements of the aggregation phase.

Database Size: The total amount of processing effort for a batch processing function may also depend upon the size and make-up of the database the batch job is interacting with.

Failover Tests:

Objective of Failover Test is to get the system under test into steady state and start failing components (servers, routers, etc) and observe how response times are effected during and after the failover and how long the system takes to transition back to steady state.

Failover testing determines what will occur if multiple web-servers are being used under peak anticipated load, and one of them dies. Does the load balancer used in this architecture react quickly enough? Can the other web-servers handle the sudden dumping of extra load?

Network Sensitivity Tests:

Network sensitivity tests specifically focus on Wide Area Network (WAN) limitations and network activity (traffic, latency, error rates, etc) and then measure the impact of that traffic on an application that is bandwidth dependant. The primary objectives of Network Sensitivity Tests are:

• Determine impact on system response time over a WAN;
• Determine the capacity of a system based on a given WAN;
• Determine the impact on a system under test that is under ‘dirty’        communications load.

Response time is the primary metric of measure for Network Sensitivity testing, and is recorded as part of scenario test execution. Response time can be estimated as –

Response Time = Transmission Time + Delays + Client Processing Time + Server Processing Time

Where:

Transmission Time = Data to be transferred divided by bandwidth
Delays = Number of turns multiplied by ‘Round Trip’ response time
Client Processing Time = Time taken on users software to fulfill request
Server Processing Time = Time taken on server computer to fulfill request


2.2 When to Start and Stop Performance Testing?


When to Start Performance Testing
A common practice is to start performance testing only after functional, integration, and system testing are complete; that way, it is understood that the target application is “sufficiently sound and stable” to ensure valid performance test results.
However, the problem with the above approach is that it delays performance testing until the latter part of the development lifecycle. Then, if the tests uncover performance-related problems, one has to resolve problems with potentially serious design implications at a time when the corrections made might invalidate earlier test results. In addition, the changes might destabilize the code just when one wants to freeze it, prior to beta testing or the final release.
A better approach is to begin performance testing as early as possible, just as soon as any of the application components can support the tests. This will enable users to establish some early benchmarks against which performance measurement can be conducted as the components are developed.

When to Stop Performance Testing

The conventional approach is to stop testing once all planned tests are executed and there is consistent and reliable pattern of performance improvement. This approach gives users accurate performance information at that instance. However, one can quickly fall behind by just standing still. The environment in which clients will run the application will always be changing, so it’s a good idea to run ongoing performance tests.
Another alternative is to set up a continual performance test and periodically examine the results. One can “overload” these tests by making use of real world conditions. Regardless of how well it is designed, one will never be able to reproduce all the conditions that application will have to contend with in the real-world environment.


2.3 Pre-Requisites for Performance Testing


Following are the prerequisite which should be in place before performance testing is commenced –
• Quantitative, relevant, measurable, realistic, achievable requirements
As a foundation to all tests, performance requirements should be agreed prior to the test. This helps in determining whether or not the system meets the stated requirements. The following attributes will help to have a meaningful performance comparison.
• Stable system
A test team attempting to construct a performance test of a system whose software is of poor quality is unlikely to be successful. If the software crashes regularly, it will probably not withstand the relatively minor stress of repeated use. Testers will not be able to record scripts in the first instance, or may not be able to execute a test for a reasonable length of time.

• Realistic test environment
The test environment should ideally be the production environment or a close simulation and be dedicated to the performance test team for the duration of the test. A test environment that bears no similarity to the actual production environment may be useful for finding obscure errors in the code, but is, however, useless for a performance test.

• Controlled test environment
Performance testers require stability not only in the hardware and software in terms of its reliability and resilience, but also need changes in the environment or software under test to be minimized. Automated scripts are extremely sensitive to changes in the behavior of the software under test. Test scripts designed to drive client software GUIs are prone to fail immediately, if the interface is changed even slightly. Changes in the operating system environment or database are equally likely to disrupt test preparation as well as execution and should be strictly controlled.

• Performance testing toolkit
The execution of a performance test must be, by its nature, completely automated. However, there are requirements for tools throughout the test process. Main tool requirements for Performance Testing Toolkit are as following -
Test database creation/maintenance
Load generation tools
Resource monitoring
Reporting Tools


3 Performance Testing Methodology


The typical performance testing methodology includes four phases: preparation, development, execution and results summary as shown in the diagram below.
Performance Test Preparation: The first phase starts prior to commencing the performance testing.     Project Manager / QA Manager perform preparation tasks such as planning, designing, configuring the environment setup etc.
Script Development: The second phase involves creating the performance test scenarios and relevant test scripts that will be used to test the system.
Test Execution/Analysis: The third phase includes running the scenario. The data gathered during the run is then used to analyze system performance, develop suggestions for system improvement and implement those improvements. The scenarios may be iteratively rerun to achieve load test goals.
Test Results Reporting: The purpose of the last phase is to report the outcome of the work performed for the load test.

3.1 Performance Test Preparation


The first step in a successful implementation is to perform preparation tasks which include planning, analysis/design, defining “white box” measurement, configuring the environment setup, completing product training and making any customization, if needed.

Planning Purpose of planning is to define the implementation goals, objectives, and project timeline. Project managers and/or technical leads typically perform the planning phase in conjunction with the implementation teams –

• Project goals broadly define the problems that will be addressed and the desired outcome for testing.
• The project objectives are measurable tasks that, once completed, will help meet the goals.
• The project timeline will outline the sequence, duration and staff responsibility for each task.

Analysis/Design In this context, the analysis/design should first identify a set of scenarios that model periods of critical system activity. This analysis is especially important in global operations where one continent’s batch processing is running concurrently with another continent’s online processing.
High volume business processes/transactions should be built into the test. Choosing too few transactions might leave gaps in the test while choosing too many will expand the script creation time. It is effective to model the most common 80% of the transaction throughput; trying to achieve greater accuracy is difficult and expensive. This is typically represented by 20% of the business processes—roughly five to 10 key business processes for each system module.

Margin for Error Since load testing is not an exact science, there should be accommodations made to provide a margin for error in the test results. This can compensate for poor design and help avoid false positives or negatives. A load test should include at least one stress test or a peak utilization scenario. A stress test will overdrive the system for a period of time by multiplying the load by some factor—120% or greater. Peak utilization will address the testing of peak system conditions.

White-Box Measurement The white-box measurement section defines the tools and metrics used to measure internal system
Under-test (SUT) performance. This information helps to pinpoint the cause of external performance issues. It also leads to recommendations for resolving those issues.

Environment Setup The purpose of the environment setup phase is to install and configure the system under test. Preparation includes setting up hardware, software, data, performance test tool and white-box tools. Since the sole purpose of this test environment is to conduct performance tests, it must accurately represent the production environment. It is crucial to know the specifications of the Web server, databases, or any other external dependencies the application might have.

• Software In addition to the hardware required for a load test, the test bed must also have fully installed and functioning software. Since Performance Test Tool functions, “just like a user,” the system would need to successfully support all user actions.

• Network it is probably impossible to accurately model each and every network access (FTP, print, Web browse, e-mail download, etc.), it is judicious to examine the current network utilization and understand the impact of incremental network traffic.

• Geography Often the application under test will support a global enterprise. In this environment tests may often need to be run at remote sites across the WAN. WAN connectivity needs to be emulated in the lab, or assumptions must be made.

• Interfaces Large systems seldom service a company’s entire information needs without interfacing to existing legacy systems. The interfaces to these external data sources need to be emulated during the test, or excluded with supporting analysis and justification.

3.2 Script Development


During the script development phase, the test team builds the tests specified in the design phase. This depends on the number of tests, test complexity and the quality of the test design.

Initial Script Development
It is desirable to have a high degree of transparency between virtual users and real human users. In other words, the virtual users should perform exactly the same tasks as the human users. At the most basic level, any performance test tool offers script capture by recording test scripts as the users navigate the application. This recording simplifies test development by translating user activities into test code. Scripts can be replayed to perform exactly the same actions on the system. These scripts are specified in the design and should be self-explanatory. Any of these following issues can easily increase script development time. –

Lack of Functional Support 
One of the most important factors in script creation productivity is the amount of functional support provided—access to individuals who understand application functionality. This manifests itself when a test team member encounters a functional error while scripting—the business process won’t function properly. The team member typically has to stop since he or she is not equipped with the skills to solve the issue. At that point, script creation is temporarily halted until a functional team member helps resolve the issue.

Poor Quality of Test Design 
The second script development factor is the quality of the test design. Ideally the test design should specify enough information for an individual with little or no application experience to build tests. System test documentation is often an excellent source of this information. Often designs are incorrect or incomplete. As a result, any omission will require functional support to complete script development.

Low Process Stability 
To load/stress test a large system, the system’s business processes first need to function properly. It is typically not effective to attempt to load test a system that won’t even work for one user. This typically means that the system needs to be nearly completed.

System Changes 
A key factor in script development is the frequency of system changes. For each system revision, test scripts need to be evaluated. Tests may require simple rework or complete reconstruction. While testing tools are engineered to minimize the effect of system change, limiting the system changes will reduce scripting time.

Availability of Test Data 
The system will need to be loaded with development test data. This data often comes from a legacy-system conversion and will be a predecessor to the volume data for the test.

Parameterization Script
Replaying the same user actions is not a load test. This is especially true for large multi-user systems where all the users perform different actions. Virtual user development should create a more sophisticated emulation—users should iteratively perform each business process with varying data. Script development next extends the tests to run reliably with parameterized data. This process reflects the randomness of the user population activity.

Build Volume Data Parallel to script development
Volume data should be constructed to support the execution of the load test. Typically business processes consume data—each data value may be used only once. As a result, there needs to be sufficient data to support large numbers of users running for a number of iterations— often 10,000 items or more.

3.3 Test Execution/Analysis


The execution/analysis phase is an iterative process that runs scenarios, analyzes results and debugs system issues. Test runs are performed on a system that is representative of the production environment. Performance test tool is installed on driver hardware that will create traffic against the application under test.

Data Seeding
The system should be “pre-seeded” with data consumed by the testing process. To keep testing
productivity high, there should be enough data to support several iterations before requiring a system refresh.
System Support
The purpose of system support is to help interpret performance results and white-box data. While the Performance tool will describe what occurred, the system support could help to describe why and suggest how to remedy the problems. These suggestions can be implemented and the tests rerun. This iterative process is a natural part of the development process, just like debugging.

Light Load
The first step is to run the scenario’s test scripts with a small numbers of users. Since the scripts functioned properly in the development environment, the emphasis should be to recreate this functional environment for execution. Any new script execution errors will typically indicate system configuration differences. It is advisable to avoid script modifications at this stage and concentrate on system-under-test installation.

Heavy Load
Finally the last step is to run a full-scale load test. This typically consumes 50% of the total execution/analysis time. Once the entire scenario is running, the effort shifts to analyzing the transaction response times and white-box measurements. The goal here is to determine if the system performed properly.


3.4 Test Results Reporting


Finally, the results summary describes the testing, analysis, discoveries and system improvements, as well as the status of the objectives and goals. This typically occurs after the completion of testing and during any final “go live” preparation that is outside the scope of testing.

The Performance Test deliverables could be:

• Performance Test Strategy
• Load Scenarios
• Virtual User Scripts
• Status/Analysis Reports
• Performance Test Summary Document

Following measurements can be illustrated in performance test report –

Attempted Connections: The total number of times the virtual clients attempted to connect to the AUT (Application under Test).

Connect Time: The time it takes for a virtual client to connect to the application being tested (the ABT), in seconds. In other words, the time it takes from the beginning of the HTTP request to the TCP/IP connection.

Hit Time: The time it takes to complete a successful HTTP request, in seconds. (Each request for each database transaction, business logic execution, etc. is a single hit). The time of a hit is the sum of the Connect Time, Send Time, Response Time, and Process Time.  

Load Size: The number of virtual clients running concurrently.

Receive Time: The elapsed time between receiving the first byte and the last byte. (Network traffic)
Response Time: The time it takes the ABT to send the object of an HTTP request back to a Virtual Client, in seconds. In other words, the time from the end of the HTTP request until the Virtual Client has received the complete item it requested (Wait Time + Receive Time).

Successful Hits: The total number of times the virtual clients made an HTTP request and received the correct HTTP response from the ABT. (Each request for each database transaction, business logic execution, etc. is a single hit).

Transactions/sec (passed): The number of completed, successful transactions performed per second.

Transactions/sec (failed): The number of incomplete failed transactions per second.

Bandwidth Utilization: Assesses the network health during performance testing.

Memory Utilization: Comparison of memory usage on the server before and during the load test.

%CPU Utilization: Comparison of % CPU utilization on the server before and during the load test.

DB connections: Variation in the number of open db connections

Thursday, 3 October 2013

SIP CALL FLOWS & RFC 5359

 SIP Entities Call Flows:

1) Registrar Server  :


                                             User A                                            Registrar
                                                                                                    Server

Step 1
 In this case User A  sends a REGISTER request, where the fields “from” and “to” correspond to the registered user and Request-URI contains the address of "Registrar". The Proxy server, who acts as" Registrar Server".

Step 2

The Registrar server Challange the  User A  by adding "WWW-Authenticate" header field in 401 Unauthorized Response.

WWW-Authenticate: Digest realm="atlanta.com", qop="auth", opaque="", nonce="f4dfjkdfh6jfjdf7fdfdf7fdf8dfd4", algorithm=MD5, stale=false


Step 3

User A send Register request with Credentials containing the authentication information of user agent for the proxy added in header field " Authorization".

Authorization: Digest Username="alice",realm="atlanta.com",nonce="f4dfjkdfh6jfjdf7fdfdf7fdf8dfd4",, response="f8fjfhgf8ffgf8gfg9egt9gt9gtsfs9",cnonce="gtgt5kuyk6jujuj8",opaque="",qop=auth.


Step 4


Registrar server sends,   Registration successfull -200 OK response back to User agent .

 Registration Unsuccessfull - 401 Unauthorized back to User agent.


Proxy Server :

                                     User A                      Proxy Server                     User B                                                                                     
Add caption

Step 1
 In this case User A and User B sends a REGISTER request, where the fields “from” and “to” correspond to the registered user and Request-URI contains the address of "Registrar". The Proxy server, who acts as" Registrar Server", checks if the user can be authenticated and sends an OK message if everything is fine.

Step 2
User sends an INVITE request to the proxy server. Immediately, the proxy sends a TRYING 100 to stop the retransmission and reroute the request to the User B by sending an INVITE to it.

Step 3
The User B on receiving the INVITE sends a TRYING 100 to proxy followed by a Ringing 180. It is at this time the telephone begins to ring and it is also reroute by the proxy to the User A.

Step 4
Finally, User B sends the  200 OK message to the proxy which is sent to User A which is acknowledged by User A and the ACK is sent to User B. 

Step 5
The call is now establised and the RTP transport protocol starts with the parameters (ports, addresses, codecs, etc.) of the SDP protocol.

Step 6
This transaction corresponds to a session end . This is carried out with an only BYE request to the Proxy, and later reroute to User B. This user replies with an  200OK message to confirm that the final message has been received correctly.




Redirect Server:




















UA Server:






















**************************************************************
 


 Call Functionality/Supplementary features Call Flows


Basic Call Flow(Two-Party session):





CALL BUSY:























CALL HOLD:


         UserA                     Proxy                          UserB

In this scenario, User A calls User B, then User A places the call on hold. User A then takes the call off hold, then  User A hangs up the call.  Note  that hold is unidirectional in nature.  However, a UA that places the  other party on hold will generally also stop sending media, resulting  in no media exchange between the UAs.  Older UAs may set the connection address to 0.0.0.0 when initiating hold.  However, this  behavior has been deprecated in favor or using the a=inactive SDP  attribute if no media is sent, or the a=sendOnly attribute if media  is still sent.


  Also note the use of the rendering feature tag in Re-Invite (Hold) to indicate that User B's UA is no longer rendering media to B, i.e., that User B has placed the call on hold.

SIP Rendering:

                                       sip.rendering", which positively describes whether the user  agent is rendering any of the media it is receiving.  Ex: conferencing. It MUST only be used in a Contact header field in a dialog created using the INVITE request. This parameter has three legal values: "yes", "no", and "unknown".


  • The value "yes" indicates positive knowledge that the user agent is rendering at least one of the streams of media that it is receiving. 
  • The value "no" indicates positive knowledge that the user agent is  rendering none of the media that it is receiving.
  •  The value  "unknown" indicates that the user agent does not know whether the media associated with the session is being rendered (which may be the  case if the user agent is acting as a 3pcc (Third Party Call Control)

Point to be remembered (Hold):

1) A sends re-invite to B, with new SDP Offer  that includes Attribute(a) = SendOnly /Inactive.

2) B accepts the Hold request with SDP answer that includes Attribute(a) = RecvOnly
3) The media session is unidirectional,but B UA doesn't send data.

Point to be remembered (UnHold):

1) A sends re-invite to B, with new SDP Offer  that doesn't includes Attribute(a) = SendOnly /Inactive.
2) B accepts the UnHold request with SDP answer that doesn't includes Attribute(a) = RecvOnly
3) RTP stream is re-established between A & B.

MUSIC ON HOLD:






CALL FORWARD UNCONDITIAL:



























B wants all calls forwarded to the Public Switched Telephone  Network (PSTN) (which is just another URI to the proxy server).  A calls B.  The proxy server rewrites the Request URI, and
   forwards the INVITE to a Gateway.  Details of messaging behind the  Gateway are not shown.

   Note that the 181 Call is Being Forwarded response is shown as sent  by the proxy.  Strictly speaking, the proxy is behaving as a user agent in this case as a proxy cannot generate non-100 provisional responses.

   Note also that forwarding could be accomplished using a redirect (302  Moved Temporarily response).

REST API

  API  is an application programming interface. It is a set of rules that allow programs to talk to each other. The developer creates the AP...