Saturday 10 December 2011

Decompression Errors



  1. Z_Data_ERROR
  2. Z_MEM_ERROR
  3. Z_BUFFER_ERROR


Z_DATA_ERROR: This means that the response received by LR as a response to a request cannot be decompressed either due to bad data or data being corrupted on its way. If you are getting very low amount of these kind of error messages, it either means that your load generator is overloaded or you have network issues intermittently which is corrupting the packets or your servers are having some kind of bottlenecks and due to these bottlenecks they are not in position to send the complete file to the client.

Normally by looking at the content length received from the server response over the duration of time for the same request,one can make out if the server is having the any kind of bottlenecks.If content length looks similar across many requests and if LoadRunner has successfully decompressed some requests and some have failed, it means that either your LG’s are overloaded or you are having networks issues which corrupts the data flowing across the wire.

Z_MEM_ERROR: This error is received if for some reasons your LG’s boxes are running low on memory requirements,and due to less amount of memory,LoadRunner is not able to decompress the server response.Monitor your Load Generator boxes for memory usage.

Z_BUFFER_ERROR: This means LR doesn't have enough buffer size to accept response for an request. Check out my previous post which has the solution for this.

Friday 9 December 2011

Why do we need a dryrun?

Why is a Dryrun?
Before executing any actual test we execute same scripts for a smaller duration of time. This is called as a Dryrun.

Why do we need this?
There are few important reasons why we perform a dryrun before we begin our actual test

  • Server warm-up (Usually servers are bounced before starting the test. Its a good practice in fact)
  • Checking for transaction failures (script errors or server side issues or application issues)
  • To avoid caching issues which might create outliers

Network Buffer


What is Network Buffer?
Network buffer size sets the maximum buffer size that receives HTTP response from the server. 

How does it impact my test?
If the size of response is huge, then the server will send data in chunks. This will be an overhead to the system when multiple Vusers are running. Default size of network buffer is around 12KB. Follow below mentioned steps to increase the size of network buffer.

  • On a WIN 7 system, go to C:\Program Files (x86)\HP\LoadRunner\dat
  • Open file called "WebAdvancedOpt.txt"
  • Go to line which looks something like this "6="T_EDIT_NUM;Web;NetBufSize;Network buffer size; ..."
  • By default, 12288 Bytes is the size of network buffer. This can be increased anything less than 32KB


Thursday 29 September 2011

Mastering vi Editor




1. Start-up
vi filename

2. vi Modes
vi has two modes

  •     Command mode: In command mode, the letters of the keyboard perform editing functions (like moving the cursor, deleting text, etc.). To enter command mode, press the escape <Esc> key. By default vi starts in command mode. 
  •     Insert mode: In insert mode, the letters you type form words and sentences. Unlike many word processors, vi starts up in command mode.

3. Entering Text
Press i
If you make a mistake, pressing <Backspace> or <Delete> may remove the error, depending on your terminal type.

4. Moving the Cursor
To move the cursor to another position, you must be in command mode. If you have just finished typing text, you are still in insert mode. Go back to command mode by pressing <Esc>. If you are not sure which mode you are in, press <Esc> once or twice until you hear a beep. When you hear the beep, you are in command mode.
The cursor is controlled with four keys: h, j, k, l.

     Key        Cursor Movement
     ---        ---------------

     h        left one space
     j        down one line
     k        up one line
     l        right one space
   
5. Undoing
To undo your most recent edit, type
     u
To undo all the edits on a single line, type
     U (uppercase)
Undoing all edits on a single line only works as long as the cursor stays on that line. Once you move the cursor off a line, you cannot use U to restore the line.

6. Closing and Saving a File
With vi, you edit a copy of the file, rather than the original file. Changes are made to the original only when you save your edits.

To save the file and quit vi, type
     ZZ
The vi editor editor is built on an earler Unix text editor called ex. ex commands can be used within vi. ex commands begin with a : (colon) and end with a <Return>. The command is displayed on the status line as you type. Some ex commands are useful when saving and closing files.

To save the edits you have made, but leave vi running and your file open:

    Press <Esc>.
    Type :w
    Press <Return>.

To quit vi, and discard any changes your have made since last saving:

    Press <Esc>.
    Type :q!
    Press <Return>.

How to search files in unix/linux env


find PATH -name 'FILE.extn'

  • find: Find is a command 
  • PATH: Where do you want to search. /home will focus the search in home directory. If you are not sure about the path, mention /. This symbol stands of root. All directories will be searched including mounted filesystems.
  • -name: This option makes the search case sensitive. -iname option to find something regardless of case.
  • 'FILE.extn': File name that you are searching
Example:


  1. find / -name 'gc.dat'
  2. find /home -name 'gc.dat'
  3. find / -iname 'gc.dat'

Wednesday 28 September 2011

Performance Testing API(s)





Functional Performance Testing - Single user access API over a period of time and captures response time during each attempt. Average response time during the time period is taken as baseline for rest of the tests.

Load Testing - Web API(s) is loaded with certain number of users to achieve targeted TPS (Transactions per sec). Typically this test is done after establishing a baseline for each transaction, and finally load testing the entire group of transactions.

Stress Testing - Users are ramped up until a failure occurs. This helps us identify breaking point of the application and to establish margin between expected traffic and failure point.

Soak (Endurance) Testing - API(s) are subjected to typical user load over a extended time with occasional spikes. The intend here is to identify problems that may occur only after a extended uptime.

Scalability TestingAPI(s) are subjected to varying user load over a period of time. The intend here is to identify the optimum user load. Here users are being varied. Scalability test can be performed even by varying any system configuration or hardware.

What does 403 error really mean?



            Every request get a status message from the server, 403 means 'Access Forbidden'. But what most of us don't know is the meaning of its sub-status. Below list gives us a clear idea of what it really means
  • 403.1 - Execute access forbidden.
  • 403.2 - Read access forbidden.
  • 403.3 - Write access forbidden.
  • 403.4 - SSL required.
  • 403.5 - SSL 128 required.
  • 403.6 - IP address rejected.
  • 403.7 - Client certificate required.
  • 403.8 - Site access denied.
  • 403.9 - Too many users.
  • 403.10 - Invalid configuration.
  • 403.11 - Password change.
  • 403.12 - Mapper denied access.
  • 403.13 - Client certificate revoked.
  • 403.14 - Directory listing denied.
  • 403.15 - Client Access Licenses exceeded.
  • 403.16 - Client certificate is untrusted or invalid.
  • 403.17 - Client certificate has expired or is not yet valid.
Source: www.wikipedia.org