Archive for the ‘JMeter’ Category

How to use JMeter to load test Flex applications

May 6, 2008

JMeter, AMF setting for HTTP SamplerFlex applications use a binary protocol called AMF. The easiest way to use JMeter with a Flex application is to use Charles (the indispensable 100% pure Java cross platform http debugging proxy). Here are the steps:

  1. Start Charles and visit the site whose Flex application you wish to load test. In Charles, you will see the entire HTTP traffic.
  2. Click on the Charles’s Sequence panel to see the ordered list of HTTP requests.
  3. Right click (on Mac control click) and save the HTTP request corresponding to a Flex AMF call to a file.
  4. On JMeter create a new HTTP sampler for this request. Set the Send a File with Request to the file that you saved on the step before. Set the MIME Type to application/x-amp (click here to see the JMeter screen)

That is really it. Just save the request using Charles, and then reference it in the JMeter HTTP Sampler. Couldn’t get much easier than this. The solution gets a bit more complicated if you need to read the requests and extract data for use in subsequent requests. To do this, you’ll have to write some code. I’ll add an entry on how to do this soon.