Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Debomita Bhattacharjee
Page 12 of 59
Creating Variables using Pre Request Script using Postman?
We can create variables using Pre-Request Script in Postman. We can set, update, or clear variables prior to the execution of the actual request. To set an Environment variable, we have to add the below script under the Pre-Request Script tab.postman.setEnvironmentVariable(name of variable, value of variable)To set a Global variable, we have to add the below script under the Pre-Request Script tab.postman.setGlobalVariable(name of variable, value of variable)Step1 − Select an Environment – Environment_Test from the No Environment dropdown.Step2 − In the address bar enter {{URL}} (an Environment variable available to the Environment_Test). Hover over {{URL}} to find the Scope of ...
Read MoreHow to Specify the Path to save Newman report on Jenkins using Postman?
We can specify the path to save Newman's report on Jenkins. Jenkins reports are available in various formats and can be managed by appending flags in the build commands. Besides, we can mention the path of the directory where the reports shall get saved with the help of these build commands.The steps to specify the path to save Newman reports on Jenkins are listed below −As a pre-condition, Jenkins should be established in the system. The steps to work with Jenkins are available in the link − https://www.tutorialspoint.com/jenkins/index.htm. Moreover, the Newman should be installed in the system and a Collection ...
Read MoreWhat is Postman Console?
The Postman Console can be opened from the Postman application View menu Show Postman Console. Or using the shortcut Ctrl+Alt+C.Postman Console WindowInitially the message – No logs yet gets reflected in the Postman Console. There is an option to search for logs in the Console. We can clear all previous logs with the Clear button. Also, we have the option to filter all the levels of the Logs like Error, Log, Info and Warning from the All Logs dropdown.Every network request sent gets logged in the Postman Console. Once a request is sent, we can get the Response Body, code, ...
Read MoreWhat is Pre-Request Script in Postman?
The Pre-Request Script is used to run a JavaScript prior to the execution of a request. By incorporating a Pre-Request Script for a Collection, request or a folder, we can execute precondition steps like defining a variable, Parameters, Headers, Response, or logging console output.We can include a Pre-Request Script to set the order of execution of requests within a Collection. A Pre-Request Script can also handle a scenario in which a value yielded from the request one has to be fed to the next request or the value yielded from the request one has to be processed before moving to ...
Read MoreHow to run Collection Runner in Postman?
We can run Collection Runner in Postman with the help of the below steps −Click on the Runner menu in the Postman application.The Collection Runner window gets launched.Click on the Collection name from the section – Choose a collection or folder.Choose an Environment from the Environment list box and enter the number of Iterations. Also, we can set a delay time in milliseconds.We have to select a file type from the Data field if we are utilizing data from a file. Then click on the Run Collection1 button.The Collection Runner result page gets opened. The tests get triggered as per ...
Read MoreUsing the Selenium WebDriver - Unable to launch chrome browser on Mac
While working with Selenium webdriver, we may be unable to launch the Chrome browser on Mac. However, it can be avoided by following the steps listed below −Step1 − Navigate to the link:https://sites.google.com/chromium.org/driver/ and click on the download link of the chromedriver version which is compatible with our local chrome browser.Step2 − Click on the chromedriver link available for the Mac operating system.Step3 − Once the download of the zip file gets completed, unzip it to get the chromedriver.exe file. Save it to a desired location.Step4 − While mentioning the path of the chromedriver.exe file in the System.setProperty method, we ...
Read MorePostman with Newman & Jenkins
We can integrate Postman with Newman and Jenkins. Newman is used to verify and execute a Collection. To integrate Newman and Jenkins, we have to follow the below steps −Step1 − We have to complete the installation and configuration of Jenkins. The steps to perform this task is discussed in details in the below link −https://www.tutorialspoint.com/jenkins/jenkins_installation.htmStep2 − We have to install npm and Nodejs. For installation of Nodejs can be done from the below link −https://nodejs.org/en/download/current/Step3 − The npm is allocated with Nodejs so once we download the Nodejs, the npm gets downloaded automatically.Step4 − We have to install Newman ...
Read MoreHow to Install Newman using NPM?
We can install Newman using npm. Newman can be installed using npm and Node.js. To download Node.js, navigate to the link − https://nodejs.org/en/download/current/.As we have downloaded Node.js successfully, we can check it with the below command −In Windowsnode --vIn Linuxnode --versionThe npm package becomes available automatically on installing Node.js. We can check it with the below command −In Windowsnpm --vIn Linuxnpm --versionFinally to install Newman, run the below command −For Windowsnewman --vFor Linuxnewman --version
Read MoreHow to Use WebDriver Javascript Executor to Navigate to a URL using Postman?
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 MoreHow to Run WebDriver in Headless Mode using Postman?
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