![]() The variable names must follow the header names in the CSV file. ![]() To have the API work with dynamic values from the test file, we have to modify the following parameters to become variables. Pm.expect(jsonData.regionName).to.eql(“California”) The codes will test the return values of the 3 rows of input we have in our test file. Click on the Tests section and paste the following codes. The CSV data file should have a header.īefore we run the bulk input file through the API, we need to create some tests to validate the results being returned from the API. What if you have a file full of inputs you want to pass to the API? We will now show how to read inputs from a file to pass to the API.įor our example, we have a file called ip2proxytest.csv which looks like below. The previous section dealt with calling the API with a manually keyed in set of inputs. Upon pressing the Send button, you will receive the json result as below. If you don’t have an API key, you can sign up for a trial API key at and you can input it like below. Let’s test this API with the following values: Parameter name You can just replace the values in the VALUE column of the Params section with actual values that you wish to pass to the API. You will then see the parameters required to perform a GET request to this API. That will expand the collection to show you all available APIs.Ĭlick on the API which is the Proxy Detection API. Then click Import again to confirm import. Next, paste the YAML text from above then click on Import. ![]() Click on Paste Raw Text in the Import dialog. If you get shown the Create New dialog, you can just close it.Ĭlick on the Import button at the top left and you should see the below. Run the Postman software and you should see the below. ![]() The YAML text is the part inside the red box below. Next, you’ll need to go to the IP2Location IP Geolocation API Swagger page at where you need to copy out the whole YAML configuration text. We will demonstrate how to configure Postman with the IP2Proxy Proxy Detection API Swagger configuration to easily setup the request to the API.įirst of all, you will need to download the Postman software and install it. Postman is a development tool you can use to test the calling of an API. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |