views:

155

answers:

4

I have been tasked with looking for a performance testing solution for one of our Java applications running on a Weblogic server. The requirement is to record production requests (both GET and POST including POST data) and then run these requests in a performance test environment with a copy of the production database.

The reasons for using production requests instead of a test script are:

  1. It is a large application with no existing test scripts so it would be a a large amount of work to write scripts to cover the entire application.
  2. Some performance issues only appear when users do a number of actions in a particular order.
  3. To test using actual user interaction with the system not an estimation at how the users may interact with the system. We all know that users will do things we have not thought of.
  4. I want to be able to fix performance issues and rerun the requests against the fixed code before releasing to production.

I have looked at using JMeters Access Log Sampler with server access logs however the access logs do not contain POST data and the access log sampler only looks at the request URL so it cannot simulate users submitting form data.

I have also looked at using the JMeter HTTP Proxy Server however this can record the actions of only one user and requires the user to configure their browser to use the proxy. This same limitation exist with Tsung and The Grinder.

I have looked at using Wireshark and TCReplay but recording at the packet level is excessive and will not give any useful reports at a request level.

Is there a better way to analyze production performance considering I need to be able to test fixes before releasing to production?

A: 

Please check out this Whitepaper by Impetus Technologies on this page.. http://www.impetus.com/plabs/sandstorm.html

Bagzai
In the white paper recording section "Script recording is done using SandStorm’s Recording Tool. The Recording Tool is a proxy server that captures the communication between the real client application and the server. After the recording process, a test script is generated, which can later be assigned to virtual users."This sounds exactly the same as the JMeter HHTP proxy server where it rocords one users actions. My requirement is to capture traffic to the server from all users.
JosephL
A: 

Honestly, I'm not sure the task you're being asked to do is even possible, let alone a good idea. Depending on how complex the application's backend is, and how perfect you can recreate the state (ie: all the way down to external SOA services or the time/clock), it may not be possible to make those GET and POST requests reproduce the same behavior.

That said, performance testing against production data is always great, but it usually requires application-specific knowledge that will stress said data. Simply repeating HTTP GETs and POSTs will almost certainly not yield useful results.

Good luck!

Patrick Lightbody
A: 

That is going to be a hard ask. I work with Visual Studio Test Edition to load test my applications and we are only able to "estimate" the users activity on the site.

It is possible to look at the logs and gather information on the likelyhood of certain paths through your app. You can then look at the production database to look at the likely values entered in any post requests. From that you will have to make load tests that approach the useage patterns of your production site.

With any current tools I don't think it is possible to record and playback actual user interation.

It is possible to alter your web app so that is records and logs every request and post against session and datetime. This custom logging could be then used to generate load test requests against a test website. This would be some serious code change to your existing site and would likely have performance impacts.

That said, I have worked with web apps that do this level of logging and the ability to analyse the exact series of page posts/requests that caused an error is quite valuable to a developer.

So in summary: It is possible, but I have not heard of any off the shelf tools that do it.

Nat
Thanks for the great answer Nat. I think the best option is using a Weblogic servlet filter. This gives me access to the ServletRequest object which I can then pull out the POST data and other details and write them to a log. I can then use the log data as input to the app. This will have an unknown performance impact. Thankfully it will only need to run for a short period of time to get a sample of production interaction.
JosephL
A: 

Hi, I would suggest the following to get the production requests and simulate the accurate workload:

1) Use coremetrics: CoreMetrics provides such solutions using which you can know the application usage patterns. This would help in coming up with an accurate workload model. This model can then be converted into test scripts and executed against a masked copy of production database. This will provide you accurate results about the application performance in realtime.

2) Another option would be creating a small utility using AOP (Aspect oriented apporach) so that it can trace all the requests and corresponding method traces. This would help in identifying the production usage pattern and in turn accurate simulation of workload. AOP frameworks such as AspectJ can be used. This would not require any changes in code. The instrumentation can be done on the fly. The other benefit would be that thi cna only be enabled for a specific time window and then it can be turned off.

Regards, batterywalam

Mustufa Batterywala