Complex XML SOAP performance testing

I want to test a complex XML SOAP web service and as I read on k6 website that it does not natively support SOAP web service performance testing but could be used to test it. I did saw a simple example, I’ll like to know if anyone had performed such XML SOAP web service testing using k6 ?

Thanks. This is my first time using, and I like it because of its integrations into other Reporting tools like Grafana and InfluxDB

Hi there, welcome to the forum :slight_smile:

As you’ve probably seen from the example in the documentation, there’s no explicit support for SOAP in k6, but the protocol is simply XML over HTTP, and k6 handles that natively.

Did you run into any issues or missing features you would need?

One possible improvement would be to use some JS library to help you build XML documents more easily, instead of having to build them “by hand”. I haven’t tested any, but I’m sure you can find plenty on npm, and I reckon they’ll work without issues in k6 since they shouldn’t depend on NodeJS or the browser for text transformation. As long as it allows you to render the final XML as a string, you’d be able to pass that to

If you do find something that works, please mention it here on the forum so that others may benefit.

1 Like


I am just trying out tinysoap (GitHub - mhzed/tinysoap: soap client in pure javascript, runs in browser] with k6 but it is not working the reason is as per the K6 documentation below

k6 is not NodeJS, nor is it a browser. Packages that rely on APIs provided by NodeJS, for instance the os and fs modules, will not work in k6. The same goes for browser-specific APIs like the window object.

I need a soap client to work with k6 an example given in tinysoap but k6 does not seem to be compatible with tinysoap

Please help and let me know if there is a compatible version of SOAP client available for K6 SOAP or can you make tinysoap work with k6

@rarunrk Is there a specific reason you need to use tinysoap? Besides the convenience of a friendlier RPC API, k6 should be able to handle all SOAP requests natively.

Like I mentioned in the previous comment, you could use a library to help you build XML documents and then make the requests using k6’s, and one for parsing the XML responses. Maybe something like xmlcreate would be helpful, though you could also load XML templates and do any replacements with template literals.

Eventually it might be good to have some XML or even SOAP libraries for k6 served from, but in the meantime you’ll have to get creative and implement your own wrapper. Good luck!

I thank all of you can share great information with this thread.Thank you again

I have the same issue, I want to test my soap XML parse with dynamic data from CSV.

so there are two things here… one is to build XML and parse data from CSV for the required fields in XML.

so Any one tried this with K6 then please give your piece of code or give advice.