Context:
You want to load test a Adobe or Apache Flex application that uses AMF protocol to dialog with a BlazeDS Backend server (Majority of Flex applications do).
You would like to use your favorite Open Source Load Testing tool Apache JMeter for this, but unfortunately AMF protocol is binary making it impossible to:
- Variabilize request
- Extract data from responses
Failing to do this will make your test unrealistic and useless.
Hopefully Ubik Load Pack comes to the rescue.
Features:
Our plugin offers you all you need to easily do your load tests
Record
With its seamless integration with JMeter, you can record your application scenario as you would do for a regular HTTP website.
Just select File > Templates… > Recording, select “HTTP(S) Test Script Recorder” and click Start button:
Configure your browser to use JMeter proxy, in this case localhost on port 8888 and start navigating on your webapp.
When an AMF request is recorded a ULP_AMF Request will appear under Recording controller:
As you see the AMF binary and unreadable request is automatically transformed to XML.
Make Test dynamic
To make our test realistic, we want to variabilize Paris in this example to extract it from a CSV where we will put a list of French Towns.
This is just as easy as replacing in the AMF Request Paris by ${town} and adding a standard CSV DataSet in our Test Plan.
Debug your script
To do this, just add a View Results Tree to you plan, hit play button and click on one AMF Request, select ULP_AMF to XML Viewer:
This viewer shows Request and response as XML.
Or choose ULP_AMF+XPath Tester:
As you see this View will let you:
- See response as XML in the upper right panel
- Input XPath expression in the middle panel
- And see the result in the lower right panel
Once you have found the right XPath Expression go to next step and extract data.
Extract Data from Response
To extract XML, you will use ULP_AMF Post Processor.
This post processor exposes Flex Response as XML in a variable ( FLEX_RESPONSE in this example) )so that you can extract data from Flex responses and expose them as variables.You should use it whenever you must extract some data from a FLEX response.
It must be placed:
- As a child of any FLEX Response you need to decode
- Before any JMeter post-processor that must use the exposed variable (so that the variable exposed by ULP AMF PostProcessor is available to it
You can then use any Standard JMeter Post Processor to extract data from it.
Let’s use XPath extractor to extract for example country id:
Notice extractor operates on the FLEX_RESPONSE Variable (upper right) we have extracted in previous ULP_AMF Post Processor.
And now you can use ${country_id} in the following requests.
ND;LR:
As you saw in this tutorial, with Ubik Load Pack you easily reuse all your JMeter skills and get all the toolset you need to make AMF/Flex Load Tests.
To summarize with our plugin you will get:
- Recording with OOTB JMeter HTTP(S) Test Script Recorder
- Script Debugging with OOTB View Results Tree and the 2 renderers provided by plugin
- Variabilize your request with OOTB CSV DataSet thanks to the transformation or request to XML
- Extract data from responses with any of JMeter Extractors (Regexp, XPath or CSS/Jquery)
- And on top of that, Plugin will automatically handle for your all protocol technical ids: ClientId, MessageId, DSId et CorrelationId
So ask for a trial version and start playing with our plugin.
About author:
Philippe Mouawad works as an Architect and technical expert for Ubik-Ingenierie where he leads among other things the development of UbikLoadPack a set of Commercial Plugins for Apache JMeter allowing to load test different protocols like HLS, GWT, Flex.
Philippe is a committer on the Apache JMeter project and member of the PMC since October 2011.
Finally he is a co-author of a french book on JMeter called Maîriser JMeter: Du test de charge à Devops.
About us:
- Ubik Load Pack is a JMeter based solution for complex protocols.
- Follow us on Twitter and StackOverflow.
- Follow Apache JMeter on Twitter
1 Comment
Comments are closed.
Recent Posts
- How to setup ads insertion on video streaming with AWS Services 26 November 2024
- UbikLoadPack Video Streaming Plugin 10.0.0 26 November 2024
- UbikLoadPack Video Streaming Plugin 9.1.6 26 November 2024