Showing posts with label Application Performance Testing. Show all posts
Showing posts with label Application Performance Testing. Show all posts

Monday, 5 March 2012

Tips To Record A Script In OpenSTA Using Mozilla Firefox


In global everyone thinks that OpenSTA is compatible with only Internet Explorer & Netscape Navigator browsers to record a script. Through this article you will come to know how to record a script in OpenSTA using Mozilla Firefox.
In my project we had a scenario which was not compatible with IE browser but we were supposed to automate that script. After doing some R&D, finally we got a solution which I’m sharing through this post. Please find below the details to overcome this issue.
OpenSTA records only the “HTTP requests/responses”. Any browser is only a “HTTP communication vehicle”, so we can use any browser which supports “HTTP 1.0/1.1” to record a script.
Configuration details to be followed in OpenSTA
1. Open the Script Modeler in OpenSTA tool.
2. In Option → Browsers → Select any Default Browser.
3. Option → Gateway (Please keep the below mentioned setting in the Gateway)
  • In Capture: Remote
  • Administration Port: 3000
  • Port: 81
  • In Proxy:-
    • Address: proxy IP
    • Port: proxy Port
    • Secure: Machine IP; Port: 81
Configuration details to be followed in Mozilla Browser
  • After changing the above configuration details in OpenSTA, there are few more changes to be done in the “proxy details” of Mozilla browser also. Please find the below given details.
    • Open the Mozilla Browser.
    • Tools à Option à Advanced à Network à Settings.
    • Select the “Manual Proxy Configuration” radio button.
    • In HTTP Proxy: Machine IP ; Port: 81
After changing all the above configuration details we can start to record the script in Mozilla Firefox using OpenSTA.
But after recording the script there is no possiblity to view the URL detail screens in the HTML view. You will receive an error message “The webpage is unavailable because you are offline”. To overcome this issue please set the below configuration in Mozilla Browser.
  • Open the Mozilla Browser
  • In the URL tab type “About : Config”
  • In the displaying page filter by the Keyword “Network”.
  • Right click the “network.http.accept-encoding” and click Modify.
  • Remove the “gzip,deflate” field and click Ok.
By following all the above mentioned steps you can overcome this issue and record a script in Mozilla Firefox using OpenSTA.

Tuesday, 31 January 2012

Ensuring Accuracy in Performance Testing


Most of the time applications may face performance issues even after rigorous performance validation. This is primarily because of improper performance test environment setup and model. It is a common issue across the industry that the testing tool might not have performed correctly during the load testing. So it is always a best practice and a mandate to validate that the testing tool simulates the network traffic as expected genuinely and to ensure the test environment is also accurate. Here is an idea, how Queuing theory Laws can be applied in validating the Performance test accuracy and to ensure that the application has a smooth accessibility in production without performance issues.

Little’s Law
The long-term average number of customers in a stable system L is equal to the long-term average effective arrival rate, λ, multiplied by the average time a customer spends in the system, W and it is expressed algebraically,
LλW


Applying Little’s Law in Performance Testing
The Average number of (virtual) users N in the system (server) at any instance is equal to the product of average throughput X and average response time Z. It is expressed algebraically,

N= X * (Z + R), where R=think time
Demonstration of Little’s Law to ensure Performance Testing
From the results obtained from the performance testing tool, we can find how many actual users have been generated to test the application using Little’s Law. A sample load test done on a sample application with 10 users has obtained following test results.

Average Transactions/sec=1.7, Average transaction response time=0.5 sec, Average Think time=5sec


By Little’s Law, Number of virtual users emulated by the performance testing tool is, N=X*(Z+R) =1.7*(0.5+5)
N=9.35≈10 virtual users have been emulated during load test

If the actual virtual users used in the system is equal to the Little’s Law result, then neither the tool nor the server has undergone any problem. If the Little’s Law result is less than the actual virtual users, then it means remaining users were idle throughout the test.

* It is understood that the throughput data above has been extracted from the tool but it is always preferred and a best practice to use the throughput data from the server.