Posts

Showing posts with the label DELETE Request

Automating DELETE request using Rest Assured

Image
In the previous post, we have learned about automating PATCH request using Rest Assured . In this Rest Assured tutorial, we will study about sending DELETE request using Rest Assured. I would highly recommend reading previous posts before proceeding with this one. A DELETE request will delete a resource on the server. Like PUT, this method is rarely permitted on the server for obvious reasons. The db.json file before sending the DELETE request is a follows: Now lets look at example of sending of DELETE request import org.testng.annotations.BeforeClass ; import org.testng.annotations.Test ; import static io. restassured . RestAssured .*; import io.restassured.RestAssured ; import io.restassured.http.ContentType ; public class DeleteRequestTest { @BeforeClass public void setBaseUri () { RestAssured. baseURI = "https://localhost:3000" ; } @Test public void deleteTest () { given() . when () . contentTyp...

Popular posts from this blog

Extracting an XML Response with Rest-Assured