Posts

Showing posts from April, 2015

CSS/jQuery Extractor usage

Image
CSS/jQuery Extractor usage: JMeter offers CSS/jQuery Extractor   that allows you to extract server responses using a CSS/jQuery-like syntax. In this example, let us see how to use the CSS/jQuery Extractor component to extract information from server responses. Steps: Launch JMeter. Create a Simple Testplan as below: 3.     Add Thread Group, then HTTP Request Add  CSS/JQuery Expression Extractor  by navigating to  Request  |  Add  |  Post Processor  |  CSS/JQuery Extractor . Fill in the values as follows: The Response data for the HTTP Request have the below: <div class='entry'>         <h3>Must be heavy baby. This and that...</h3>         <p>Thoughts on Scala</p>         <p>Posted by tom</p>       </div>       <div class='entry'>         <h3>Lorem ipsum dolor sit amet</h3>         <p>Another Post</p>         <p>Pos

Regular Expression Extractor Example

Image
Regular Expression Extractor Example Today, we will use the Regular Expression Extractor component in JMeter to extract server responses to make our test script dynamic in nature. The script recorded below is for a site that uses   Cross-Site Request Forger  ( CSRF )  to prevent against malicious attacks that prey on user vulnerability. A token is attached to each user's session that is then sent along with every request from that user. Each user gets their own unique token, and therefore, using the same token for two users flags an error on the server and the request is denied.   We will use Regular Expression to extract the CSRF token   and correctly sent the unique token for the rest of the requests for that user in the test script. Steps: Launch JMeter. Create a Script as below: 2 HTTP Requests, 1 with GET and 1 with POST POST Request with Body data as {"value":"hello"} Debug Sampler View Results Tree HTTP Cookie Manager

Recording Jmeter Scripts behind a proxy server

Image
Recording Jmeter Scripts behind a proxy server In one of the blog we saw the steps of recording Jmeter scripts using a proxy server. JMeter has its own in-built Proxy Server, the   HTTP(S) Test Script Recorder . This is only used for recording HTTP or HTTPS browser sessions as explained in below link. http://nonfunctionaltestingtools.blogspot.com/2013/11/recording-using-http-proxy-in-jmeter.html The above steps will work properly if the internet connection is not behind a proxy and can be accessed directly. If we are testing from behind a firewall/proxy server or if we the internet access is provided using proxy server then the above steps will fail and will not record any of the steps. Steps to record in Jmeter if the internet is accessed via proxy: 1.       Start Jmeter with the firewall/proxy server hostname and port number. To do so, Open a command prompt in windows and run the jmeter.bat file from a command line with the following parameters: -H [proxy

Steps to Analyze AWR Report in Oracle

Image
Steps to Analyze AWR Report in Oracle AWR -   Automatic   workload repository is a collection of persistent   system performance   statistics   owned by SYS. It resides in SYSAUX   tablespace . By default snapshot are generated once every 60 min and maintained for 7 days . Each snapshot has a unique ID know as "snap_id". Snapshot detail can be found in " dba_hist_snapshot " view.   If we have Database performance issue and not the Database machine, then AWR Report is the place to look at. AWR is not used for real-time performance monitoring like the v$ tables. It is used for historical analysis of performance. AWR complements, but doesnot replace real-time monitoring. Once AWR Report is generated in Oracle, the next task is to analyze it. By going through the AWR Report we can easily solve issues like slow database, high wait events, slow query and many more issues. Even though the report is lengthy, Analyzing or Reading relevant part of AWR Report can

Capturing the required details of a machine before starting Performance tests

We often check the machine details while before starting our performance tests. These details are very much required to know the type of H/W we are using for particular tests. Examples: Below is the example of Data Node details used as part of HBase cluster Data Node: a)        6 x Dell PowerEdge R720 Nodes Each with b)        2 x E5-2680 V2 2.8GHz 10-core, HT=ON c)        192 GB RAM d)         13 x PERC 900GB 15K 6Gbps SAS 2.5" SFF HS HDD , Total storage ~12 TB   e)        10Gb/s Full Duplex, Auto-Negotiation off Explanation: a)        6 is the number of Region Servers. Followed by Manufacturer and Product Name Any of the below Commands can be used in Linux to get specific details: 1.         To get Manufacturer and Product Name: [root@illin2933 ~]# dmidecode | grep -A3 '^System Information' System Information         Manufacturer: Dell Inc.         Product Name: PowerEdge R720         Version: Not Specified Note: Above comma