Using JMeter for PeopleSoft Performance Testing

Posted by: in Utilities

Tagged in: Untagged 

JMeter is an open source performance testing tool for web applications. I've had some success lately using it to execute performance test in my PeopleSoft HRMS and ELM environments, and I thought I'd share what I found to make it work with PeopleSoft.

Acquiring JMeter
You can download JMeter from http://jakarta.apache.org/site/downloads/index.html#jmeter_binaries. Just download the binary zip file. There's no install program, just unzip it to your C:\Program Files directory. Launch it with C:\Program Files\jakarta-jmeter-2.2\bin\jmeter.bat.

Entering the required elements
When you first open JMeter the screen looks like this:

Blank Test Plan


Right click the Test Plan, select Add > Thread Group. A thread group represents a test script.
Add Thread Group


Right click the new Thread Group, and click Add, then Config Element and choose an HTTP Request Default.
Add HTTP Request Default


Select the HTTP Request Default object. Enter the server name that you’ll be using, the port number, and the default protocol.
HTTP Request Default


Right-click the Thread Group again, select Add > Config Elements and select an HTTP Cookie Manager. The Cookie Manager will allow JMeter to keep up with PeopleSoft cookies and handle the sign-out correctly.
Add Cookie Manager

Once again, right-click the Thread Group, select Add > Listener > Aggregate Report. This will provide some basic statistics about your test.

This next step is optional, but I like to add a timer to my script so that I can add latency between the requests to simulate “think time” of real users. Right-click the thread group, select Timer, and choose a timer. I generally pick the Constant timer because it provides a simple delay between requests, but more sophisticated timers are available. Check out the include_controller_tutorial.pdf document in the docs/usermanual directory for more info.
Add Constant Timer

Activating the HTTP Proxy Server
Under Workbench, add a Non Test Element called HTTP Proxy Server.
Add HTTP Proxy Server

The HTTP Proxy Server creates an internet proxy server that will run on your computer. You’ll point your browser to it, and it will record all traffic that passes through it into your JMeter script.

Click the new HTTP Proxy Server that you created.
HTTP Proxy Server
Fill in this form as follows:

  • Set Port 8080 (or whatever works on your computer).

  • Target Controller = Thread Plan > Thread Group

  • Grouping: This is a matter of opinion, but I like to see separators between groups or groups under new controllers. Basically a group translates to all of the junk that happens between clicks, so it’s nice to see where the clicks start and end

  • Patterns to exclude: Depending on the kind of test you want to run, you may want to exclude certain files that are irrelevant to the outcome of the test. For example, if you’re testing performance of a PeopleCode function you might want to exclude image and javascript files. If you want to see overall web server performance, you might include everything. Entering “.\*.gif” will exclude GIF files

  • Click start to start the proxy server.



Configuring your browser
Before you can use the proxy server, you’ll need to configure your browser to use it. In Internet Explorer, click Tools > Internet Options, then click the Connections tab and LAN settings. Use localhost as the server, and port 8080 as the port.
Configure IE Proxy Settings



If you use Firefox, go to Tools > Options, click the Connection Settings button, and the server and port to localhost:8080.
Configure Firefox Proxy Settings

Now your proxy server is running and your web server is configured to use it. From this point forward, every URL that you visit will be recorded in your JMeter test script.

JMeter’s proxy server does have one significant limitation: It cannot decrypt SSL (https) traffic. So you’ll have to record your test script with http calls. However, I believe it can play it back with SSL if you change the protocol on your HTTP Request Defaults object.

Recording the script
Anyway, it’s time to record the script. In this example I pasted in my URL and hit enter. Then I logged on, navigated to Process Monitor, hit Refresh, and Signed out.
PS Sign In Page

Now you can record whatever functionality you like. I think it’s a good idea to record the sign in since the subsequent actions will be dependent on the sign in. I also like to sign out at the end of a test script, just to keep sessions from stacking up in the application server. If too many idle sessions accumulate, the application server can stop functioning.
Sign Out Button


When you’re finished recording, go back to JMeter and click the Stop button on your Proxy Server.
Stop HTTP Proxy

One note about this version of JMeter: If you want to start recording again, it’s a good idea to save your test script, close it, and come back in. I’ve had problems where new activity didn’t get recorded until I did that.

Running the script
Finally, to play back your test script, click Run and Start.
Click Start |Run to run the script



If you want to see if your script really works, log on to PSAdmin and check the client status. You should see your user show up as a client, then disappear as the script signs off.

To simulate multiple connections, click on the Thread Group element.
Change Thread Group Settings


The Number of Threads (users) indicates how many of users to ramp up to. The Ramp-Up period tells how long it should take before all users are active. The Loop Count tells how many times to cycle through thes script.

Hopefully that will get you started. I’ve barely scratched the surface as to what JMeter can do. For example, if you’d like to use JMeter to read data from a comma-delimited file and insert it into different fields in PeopleSoft, read up on the CSV Data Set Config object. You can also install Jmeter on multiple workstations in different locations, and remotely launch tests from there.


Trackback(0)
Comments (17)Add Comment
0
Comment from Tommy Tran
written by Tommy Tran, October 17, 2006
Hi,

I am also trying to do some load test on our PeopleSoft CRM with JMeter. I was able to manualy script the login and that worked. However, when I tried moving to the next screen, I get the generic "Cookies may not be enable screen". I check the resquest and it looked like the cookies was passed. Do you have any hint as what I should do next.



Also,

I tried using the proxy recorder and that did not record anything for me.



tia,

t
Brent Martin
...
written by Brent Martin, October 18, 2006
The proxy recorder will record all of the headers and query variables that you might not think to manually include which could solve your problem. Check out jmeter_proxy_step_by_step.pdf doc in your JMETER_HOMEdocsusermanual directory. Once you get the proxy tool going, try to record a simple script that signs in and out just to see if you can make it work. Be sure to include the Cookie Manager in your test script.



Good luck!
0
...
written by sudhanshu shekhar, October 20, 2008
hi

i followed all the instruction but the recorded script is not starting at all.what should i do to replay that particular recorded script.
October 20, 2008
Brent Martin
...
written by Brent Martin, October 20, 2008
The short answer is to click Run > Start to start the script. If you want to see what it's doing, right-click your thread group, choose Add > Post Processors > Save Responses to a file. Give it a filename prefix (like C:Temp). Then when you run the script, the results of every request will go to a file in C:Temp so that you can see what the script is coming back with.
0
Hi
written by mancho1981, October 23, 2008
Hi!

Thats nice :-)
I have question :
It is about HTTP Request: I give some Names and Values. And I want click the button! What must give for Name and Value. Its true so: Name-the name of button and Value-click ?!?!?

Thanks in advanced
0
302 errors
written by Mack, June 30, 2009
Great how-to here.
I cannot get a script to complete with jmeter 2.3.4. It works correctly until PeopleSoft returns a value. This can be a search or a date picker. The script will fail at that point and the return results shows a login page. I am using all setting as shown above and I have tried various versions of the redirects.
Any assistance would be appreciated.

Thanks
0
PeopleSoft 9 solution
written by Mack, July 01, 2009
PS9 uses a session variable "ICSID" that must be captured/reused. Use a HTTP URL Re-writign Modifier for this.
0
Peoplesoft 9, Page Is No Longer Available
written by Chris Smith, October 29, 2009

After applying the HTTP URL Re-writing Modifier, I no longer receive the login screen when submitting a search.
However, I now receive a "This page is no longer available" message.

I have verified and the ICSID is being captured and used for each thread.
The cookies are also being generated and stored.

Any advice would be appreciated. Thanks, Chris
Brent Martin
Capturing ICSID
written by Brent Martin, November 01, 2009
I've never used an HTTP URL Re-writing Modifier. Starting with Tools 8.48, you probably need to capture and respond back with the ICSTATENUM variable as well.

Here's how I capture and use the ICSID and ICSTATENUM variables:
1) At the thread group level, Add > Config Element > User Defined Variables. Define a variable called wrk_ICSID and wrk_ICSTATENUM
2) Add > Post Processor > Regular Expression Extractor.
Reference Name: wrk_ICSID
Regular Expression: name='ICSID' value='([^] )'
Template: $1$
Match No.: 1
Default Value: ${wrk_ICSID}
3) Add > Post Processor > Regular Expression Extractor.
Reference Name: wrk_ICSTATENUM
Regular Expression: name='ICStateNum' value='([^] )'
Template: $1$
Match No.: 1
Default Value: ${wrk_ICSTATENUM}
4) Go to each HTTP Request and change the post parameter for ICSID and ICStateNum to use the user defined variables ${wrk_ICSID} and ${wrk_ICSTATENUM}. Yes, this can be tedious.

After that, the Regular Expression extractor should be looking at each page as it comes in and extracting ICSID and ICStateNum to the variables ${wrk_ICSID} and ${wrk_ICSTATENUM}, and when the page is posted they will be sent back to the web server like PeopleSoft expects.

Posting the data that the web server sends is called "correlating the data" in performance testing circles. This article was helpful to me in understanding the process: http://90kts.com/blog/2008/jme...pressions/.
0
Re: Capturing ICSID : Brent Martin
written by Chris Smith, November 12, 2009
Thanks, Brent.

By using the HTTP URL Re-writing Modifier, I was able to capture both the ICSTATENUM and the ICSID.
Initially, I was only capturing the ICSID.
All operations within Peoplesoft are now working properly within JMeter.
0
Sign-in Page
written by Chaithra, November 25, 2009
Hello Brent,

Am using Jmeter 2.3.2 r665936 for load testing. Here am using the gmail as a test site. What am trying to do load test on the sign-in page. I want to pass more then one user name and password. Can you tell me how to go about this?

Thanks in advance,
Chaithra

Brent Martin
RE: Sign-in Page
written by Brent Martin, November 25, 2009
I'm sure there's probably a good use for a script like that, but the only thing I can think of would be to send spam and viruses using compromised gmail accounts... Just curious what you're going to do with it. And where I can get a good list of compromised g-mail accounts -- I know an ex-Nigerian leader looking for people in the US to help him launder some money for a huge reward...
0
Nice article
written by sheetal, December 16, 2009
keep it up!

www.testing-associates.com
0
trying without proxy
written by Richard, February 02, 2010
For people wishing to create scripts manually, the 'Cookies must be enabled' error is easily fixed - on your http request config element, you must untick 'Redirect Automatically' and tick 'Follow Redirects' and 'Use Keepalive'.

Having said that, the proxy is much easier to use.
0
New to jmeter
written by Rahul Kumar Sinha, April 07, 2010
Hi,

Actually i am new to jmeter. i started working on jmeter.The main problem i am facing is what i need to enter in server name and path name in the Http Request sampler. i tried differently, but it didn't work out. what is the correct way to enter server name and path name.
0
thanks
written by passer by, June 26, 2010
Just came across this - great instructions - this combined with a few other hints finaly got me up and running with a basic load test of several peoplesoft components.
Chris Harvey
Regular Expression Extractor...update
written by Chris Harvey, July 13, 2010
In regards to the steps from Bretn martin post about capturing ICSID:
Capturing ICSID
written by Brent Martin, November 01, 2009


with version 2.3.4 of Jmeter i had to change the regular expression a bit to get it to work.

Original:
Regular Expression: name='ICSID' value='Revised:
Regular Expression: name='ICSID' value='
With this change everything works great!

Additional Reading Testing with Dynamic Data (www.informit.com/guides/conten...seqNum=272)



Write comment

security code
Write the displayed characters


busy