using gatling to make soap request with attachement

Hi

I use Gatling to make bench mark with the java soap webservice and it works well.

Here is an extract of my simulation:

val scn = scenario(“Call My WebService”)
.during(5 minutes){
exec(
http(“Call WebService”)
.post("""""")
.headers(headers_1)
.body(StringBody(xmlbodyLine))
.check(status.is(200))
//.check(regex(“OK”).exists)
)
}

where xmlbodyLine is a string which contains the soap xml request

But now, I want to make a soap call that contains an attachment to my webservice which consists of joining a zip file like C:\my-home\test.zip to the soap request.

I have read the gatling 2 documentation but I do not know how I can do that.

Have you any idea to help me ?

Thanks a lot

Then you can’t just send a single body, what you need is too send a multipart body.
Use bodyPart instead of body.

Beware that you’ll probably have to change the Content-Type header.

Cheers,

Stéphane

Stephane,

Thanks a lot for your time and your quick replies.

Gatling is great soft for performance testing.

Nguyen

You’re welcome.
Have fun!