Selenium vs XmlUnit+HttpClient for web REST API testing Selenium vs XmlUnit+HttpClient for web REST API testing selenium selenium

Selenium vs XmlUnit+HttpClient for web REST API testing


Another option might be to use REST Assured, a Java DSL for testing REST services. It allows you to write unit style tests with little boilerplate code for both XML and JSON. Additionally, it provides more advanced features like authentication, XSD / DTD validation, response codes, cookies, etc. More information is available at their usage page.

Disclaimer: REST Assured is an open source project initiated by a colleague of mine.


If you want to do real functional testing on rest API's, then I can recommend Fitnesse with this fixture: https://github.com/smartrics/RestFixture

Selenium is just a poor choice for this kind of thing.

As for performance testing you can knock up rest API tests in Jmeter in a matter of minutes, no need to pay a 3rd party.


Testing an API does not sound like functional testing but more like unit-testing. So I'd go for XmlUnit+HttpClient