![]() You can use custom keywords in the test case. We don't specify any authorization, HTTP header, or HTTP body for this sample GET request. Authorization & HTTP Header & HTTP Body:.Conversely, you can disable this option to prevent automatically redirecting such requests that return a 3xx series response, you can examine and manage the redirection manually. The Follow redirects option allows you to automatically make a new request when the server responds with a 3xx status. We specify the value for the id variable in the Variables tab. ![]() For the POST request, we specify the API endpoint as follows: $, with the base URL is listed as a global variable. Any mismatch between method and URL leads to an invalid request exception at runtime or a wrong data response. The server will return us with a new userID as a response.Īlong with the request method, request URL is to tell the web server which API is utilized under test. Here, we create a POST request to send the user information to the server to create an account. The method needs to match the API endpoint to be a valid request. Katalon allows you to choose one of the following methods: GET, POST, PUT, DELETE, PATCH, HEAD, CONNECT, OPTIONS, TRACE. In this sample POST object, we specify the following information: To access the sample RESTful requests, in the Test Explorer panel, go to the Object Repository folder. We created two sample RESTful requests in this project: a POST request and a GET request. Katalon creates three global variables in this sample project as follows: Name To learn more about execution profile, you can refer to this document: Execution profile. They can be used across test cases in your project. You can create and save all global variables in the execution profile. To open the execution profile, go to Profiles > default. Sample API project components in Katalon Studio Profiles In Katalon Studio - Platform Edition, open that project by going to File > Open Project. See: Upload Test Scripts from a Git Repository. On Katalon TestOps, open a project and clone this sample API test from our GitHub repository: Web Service tests. To open the API sample project, in Katalon Studio - Standalone Edition, go to File > New Sample Project > Sample API Tests Project.Īlternatively, you can download the sample API test project from our GitHub repository: Web Service tests. Open the sample API test project In Katalon Studio ![]() To learn more about API testing, you can refer to this document: Introduction to API testing. ![]() This sample demonstrates fundamental API testing with RESTful requests. Sample API tests project in Katalon Studio ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |