Testing web services? With no UI? Isn’t that a Developers job? Well… No… Since 2010, there’s a free open source tool on the testing market which enables you to easily create web service requests and evaluation of responses. Nevertheless, it offers a cool Gherkin-style syntax which makes it even easier to understand and use. Since […]
Testing web services? With no UI? Isn't that a Developers job?
Well... No...
Since 2010, there's a free open source tool on the testing market which enables you to easily create web service requests and evaluation of responses. Nevertheless, it offers a cool Gherkin-style syntax which makes it even easier to understand and use.
Since it is a free tool then it is only skills that are required to use it. And that would be just basic Java programming knowledge.
Here's a sample of what a simple RestAssured test would look like:
CreateInvoiceRequest request = new CreateInvoiceRequest();
@Test
public void testInvoiceCreation(){
given().request()
.body(request.setInvoiceNumber("someNumber").setInvoiceItem("someItem").done()).when().post().then().statusCode(200)
.body(hasToString(containsString("<ns2:TotalRegistries>1</ns2:TotalRegistries>")))
.body(hasToString(containsString(request.getInvoiceNumber())));
}And where outside of it, we have defined the request template which we're going to use in CreateInvoiceRequest
Here are the results:
That is just one scenario which creates an invoice. Note that the execution time is about 1.5 seconds.
Experienced QA and Test Automation Developer. With background in different domains such as Web, Client server, desktop applications and development and QA tools. Expert in creating Test Automation Frameworks in using different platform, tools and programming languages.
Sign up for our newsletter and never miss an article
[mc4wp_form id=8036]
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.