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 k6.io, and I like it because of its integrations into other Reporting tools like Grafana and InfluxDB
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 http.post().
If you do find something that works, please mention it here on the forum so that others may benefit.
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 http.post(), 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 jslib.k6.io, but in the meantime you’ll have to get creative and implement your own wrapper. Good luck!