- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 69 Articles for SOAP API
334 Views
We can set Tests using the Functional method in Postman. A test in Postman gets executed only if a Request is successful. In case a Response does not get generated, the test does not to validate it.Tests implemented in the Functional method are written within the Tests tab.Add the following verification using the Functional method within the Tests tab −pm.test["Status Code is 401"], function(){ pm.response.to.have.status(401) })Here, pm.test is the function. Status Code is 401 is the test name which shall be displayed in the Test Result tab after execution. The pm.response is used for getting the Response ... Read More
683 Views
We can set multiple Tests for a Request in Postman with JavaScript method. A Test in Postman gets executed only if a Request is successful. In case a Response does not get generated, a test does not to validate it.Tests implemented in the JavaScript method are written within the Tests tab.Add the following JavaScript verifications within the Tests tab −tests["Status Code should be 200"] = responseCode.code === 200 tests["Response time lesser than 10ms"] = responseTime
611 Views
There are different parameters available in Newman. Newman's command to list down all options is − newman run –h. Options in Newman is grouped into categories listed below −UtilityBasic setupRequest optionsOther Misc. OptionsUtility-h, --help – displays usage information.-v, --version - displays version number.Basic Setup--folder [name of folder] – points to a folder in Collection for execution.-e, --environment [name of file| URL] - points to an Environment in the form of JSON file.-d, --iteration-data [file] – mentions a data file to utilize either csv or json.-n, --iteration-count [number] – specifies the count of iterations to.Request Options--delay-request [number] – configures delay in ... Read More
989 Views
We can use the Selenium webdriver JavaScript Executor to navigate to a URL. Selenium can run JavaScript commands by using the executeScript method.The parameters to be passed to the executeScript method to navigate to a URL is - window.location = \'"+s+"\'. Here, s is the variable which stores the link of the page to navigate.SyntaxJavascriptExecutor js = (JavascriptExecutor) driver; String s = "https://www.tutorialspoint.com/about/about_careers.htm"; String scrpt = "window.location = \'"+s+"\'"; js.executeScript(scrpt);Code Implementationimport org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; import org.openqa.selenium.JavascriptExecutor; public class LnkJSNavigate{ public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java \chromedriver.exe"); ... Read More
250 Views
We can run webdriver in headless mode. This is achieved with the HTMLUnitDriver which is the fastest webdriver among all the other browser drivers.Post Selenium 2.53 version, the HTMLUnitDriver jar should be added explicitly in the project. To add the required dependency, the below steps need to be followed −Navigate to − https://github.com/SeleniumHQ/htmlunit-driver/releases.Click on the jar marked in the below image.Right-click on the project and choose the option Build path. Then click on Configure Build Path.Click on Java Build Path and select the Libraries tab. Click on the Add External JARs button. Then add the downloaded HTMLUnitDriver jar. Finally, click ... Read More
249 Views
With the help of OAuth 2.0, we shall first obtain an access token for an API. This token shall be used for authentication of all the future requests. The data access with OAuth 2.0 differs from one API access provider to another. However, it generally consists of sending requests back and forth between the user, API and the client.OAuth 2.0 FlowThe client sends a request to authorize the access to the data for the user.If the user permits access, then the application requests an access token from the service provider. This is done by sending the access permit from the ... Read More
3K+ Views
We can use sessions in Postman. To create a session the follow the below steps −Step1 − Click on the eye icon appearing to the right upper corner of the Postman application. Then click on Edit in the Globals section.Step2 − Enter u in the VARIABLE field. Set the INITIAL VALUE(to be synced with Team Workspace) as test123 and CURRENT VALUE(local to our Postman instance unless the changes are persisted) as Test.Step3 − Click on the eye icon again, the Global variable u gets displayed. Now, click on the CURRENT VALUE field and update its value to Test123.With this set ... Read More
3K+ Views
We can use dynamic GUID in Postman. This can be utilized in the request URL, Body or Headers by simply adding the value {{$guid}}. It does not need any declaration or initialization.Thus {{$guid}} can be used directly in Postman without any requirement of prior processing of the variable. Postman has support for dynamic variables. GUID is one such instance.We need not allocate memory or value for this variable. The syntax is {{$guid}}. Besides GUID, there are other dynamic variables like randomInt, timestamp, and so on in Postman.Usage of Dynamic GUID in URLUrl − https://www.tutorialspoint.com/index.htm?n={{$guid}}The above image shows the usage of ... Read More
3K+ Views
We can manually generate GUID in Postman with the help of the steps listed below −Step1 − Input the endpoint − https://www.tutorialspoint.com/index.htm in the address bar.Step2 − Add the below script under the Pre-request Script tab −var u= require('uuid') var ud = u.v4() console.log(ud)In the above script, require is used in JavaScript for loading a module. Then, the version 4 of the GUID is stored in the variable ud. Finally, the generated GUID is printed in the console.It must be remembered that we cannot use a variable with name guid within a Pre-request Script in Postman. However, the guid can ... Read More
784 Views
GUID means Global Unique Identifier. It is in the form of a hexa-decima digit which is separated by hyphen. It helps to achieve distinctiveness due to this even if multiple people are creating the GUID simultaneously, the chance of having a duplicate GUID is rare.To generate a random value, using GUID, the format is −{ "name": "{{$guid}}" }On sending a request, it would produce a random value.GUID is a value with 128 bits having a structure defined in RFC4122. The structure of GUID is uncomplicated and simple for generation.The format of a GUID is shown below −xxxxxxxx-xxxx-Axxx-Bxxx-xxxxxxxxxxxxHere, A is ... Read More