Wednesday, November 25, 2009

SOAP Testing over HTTPS, using Siege instead of Ab

I've been using ab for a while now to perform load testing. Recently, I ran into trouble however because ab doesn't work with HTTPS out of the box (at least on my Ubuntu install). That triggered an investigation into other tools. Siege fit the bill nicely. Basically, I needed a way to perform an HTTP Post with a SOAP body.

On ubuntu, it is a simple "apt-get install siege".

Then, you create a siegerc file:

verbose = true
logging = true
protocol = HTTP/1.1
connection = keep-alive
concurrent = 50 #Number of concurrent requests
file = ./urls.txt
delay = 0 #If you are using for benchmarking value should be 0
benchmark = true

The settings are fairly obvious. Note that the file parameter points to an additional file you'll need, which lists out all of the urls you want included in your test. Below is an example: POST < soapMessage.xml

Notice after the url we specify "POST", which makes it a POST method instead of GET. Additionally, we pipe in the XML file which contains the SOAP message.

Then we can simply invoke siege with:

siege --rc=./siegerc --header="Authorization:Basic BASGHAJSG78236ds"

Notice, we are supplying an extra header for Basic Auth.


jlorenzen said...

hey dude. I need to talk to you.
email me at
James Lorenzen

Yue Jiang said...

Thanks dude, your blog helped me :)

peterjohn said...

Pretty good post. I just came across your site and wanted to say that I’ve really enjoyed reading your posts. In any case I’ll be subscribing to your feed and I hope you will keep a good work!Cheer!

sap online training
software online training
sap sd online training
hadoop online training

peterjohn said...

This is one awesome blog article. Much thanks again.
I really enjoy the blog.Much thanks again. Really Great.

oracle online training
sap fico online training
dotnet online training

Yatika Dhingra said...

fantastic job on writing this…
Soap n noodle 80:20
Crude oil
palm acid oil
sunflower acid oil
soya acid oil
rice fatty acid
soap stock
rice acid oil
mauha acid oil
palm kernel fatty
palm fatty hydonated
soap sac raps
Bath soda
Bath soap
pitch oil