![]() I wonder why they did remove the export data feature under the settings, I believe they did it to promote their cloud workspaces paid system. Since the double-brace syntax is not valid JavaScript, we use the pm.variables.get() function to access the id variable.įinally, let's save the changes as we've done before. The backup file will be there if Postman has some collections/requests in it, and if you go and look inside that directory, there are plenty of older backup files, not only one. Pm.expect(pm.response.json().id).to.equal(pm.variables.get("id")) ) Pm.expect(pm.response.json().name).to.equal("Transformers")) We can use the id variable to do that: pm.test("success status", () => pm.response.to.be.success ) Secondly, we know which id to expect this time, so let's verify that id. Because the tests are similar, we can copy the tests from the POST request, then make a few changes.įirstly, we don't need to set the id variable again, so let's not copy that line. Since there's no body for a GET request, let's proceed directly to the Tests tab. ![]() When on the new screen, HTTP Requests such as POST, GET, DELETE, etc are. ![]() Clicking on the New button, you can create a new request or collection. To begin with, on your landing page, you will see a number of buttons that are designed for easy navigation. Variables, when appearing outside of scripts, are referenced using the double-brace syntax. Postman is a User-friendly testing tool that allows you to send API requests in fewer steps. Thus, the GET request should retrieve the same instance that was created by the POST. In this URL, we're referencing the id variable that we previously set during the POST request. ![]()
0 Comments
Leave a Reply. |