Debomita Bhattacharjee

Debomita Bhattacharjee

590 Articles Published

Articles by Debomita Bhattacharjee

Page 9 of 59

How to get the response in different format in Mock Server using Postman?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 03-Aug-2021 758 Views

We can get the Response in different formats in Mock Server. A Mock Server is created to avoid sending requests on the real time or production data. The steps to create a Response in different format in Mock Server are listed below −Step 1 − Click on New from the top of the Postman application. Then click on the Mock Server link.Step 2 − Choose the option GET from the Method field. Add /user/home in the Request Path, 200 in Response Code and the text – This is Postman Tutori in Tutorialspoint in the Response Body field.Step 3 − Provide ...

Read More

How to Import Collection in Postman?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 03-Aug-2021 2K+ Views

We can import Collections in Postman. To perform the this task, follow the below steps −Step 1 − Click on the Import menu in the Postman application.Step 2 − Import pop-up shall open with the options to import from a File, Folder, Link, Raw text and Code Repository.Step 3 − We can either import by clicking on the Upload Files button or by drag and drop option. From the Code repository tab, we can import from GitHub.

Read More

How to set Test and Collection Runner in Postman?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 03-Aug-2021 1K+ Views

We can add test verifications to the Response obtained from a request with the help of scripts. These scripts are incorporated in the Tests tab. The tests only get executed provided the request is successful.A test developed under the Tests tab is written in JavaScript. Once a request is sent, a Response is obtained along with the test results in the Test Results tab. Tests which have passed are marked in green and the failed ones are marked in red.Add the below JavaScript verifications within the Tests tab −tests["Status Code should be 200"] = responseCode.code === 200 tests["Response time lesser ...

Read More

Different types of Asserts in Postman

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 03-Aug-2021 400 Views

There are different types of Asserts in Postman. We can add Assertions on different sections of the Response received. Some of the Assert types are listed below −Assert on Response Codepm.test["Status Code is 200"], function(){    pm.response.to.have.status(200) })The above assertion passes if the Response code is 200.pm.test["Status is OK"], function(){    pm.response.to.have.property('status', ' OK') })The above assertion is applied on the Response property – status with value as OK.Assert on Response timepm.test("Response time below 600 milliseconds", function () {    pm.expect(pm.response.responseTime).to.be.below(600) })The above assertion passes if the Response time is below 600ms.Assert on Response Formatpm.test("Response is of JSON type ", ...

Read More

Executing Tests on Cookies in Postman

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 03-Aug-2021 2K+ Views

We can execute Tests on Cookies in Postman. Once a request gets executed for an endpoint, a Response gets generated. Within a Response, the cookie information gets generated under the Cookies tab.We can add Tests script around cookies and apply Assertions on them for verification. Test scripts are incorporated under the Tests tab. Let us add the below script to verify the value of cookie – Cookie_Postman.pm.test("Verify Cookie value", function(){ pm.expect(pm.cookies.get('Cookie_Postman')).to.eql('value1')})Send the Request. After the Response is received, navigate to the Tests tab. It shows the Assertion in our Test script failed as the expected value of the Cookie_Postman is ...

Read More

How to handle Infinite loops in Postman Workflow?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 03-Aug-2021 2K+ Views

We can handle infinite loops in the Postman workflow. The requests in a Collection get executed in the order in which they appear. However, we can change the workflow with the help of the function - postman.setNextRequest().It is used to direct the next request to be executed. The name of the next request to be executed is passed as a parameter to this function.Syntax postman.setNextRequest("next request name")Let us take an example of a Collection having four requests -We would like Postman to change to a workflow such that the below requests are executed from top to bottom in the order listed ...

Read More

How to send a report through email using Selenium Webdriver?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jun-2021 3K+ Views

We can send a report through email using Selenium webdriver. The email report can be an important feature in an automation framework. An email should be necessarily sent after the combined execution of a regression suite has completed to get an overall view of the test results.The ways to send a report through email are listed below −Using the Java library - Apache Commons available in the below link: https://commons.apache.org/proper/commons-email/.Using the Java mail JAR. The details of this is available in the below link: https://javaee.github.io/javamail/Steps to configure the Java mail JAR are listed below −Step1 − Navigate to the below ...

Read More

How to do UI testing with Selenium?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jun-2021 2K+ Views

We can do UI testing with Selenium webdriver. To achieve this, we have to follow the steps listed below which can be applied to any script developed to test the UI of the application −Step1 − Object of Webdriver should be created. For example, WebDriver driver = new ChromeDriver();The above piece of code is used to create a webdriver instance and initiate the script execution in the Chrome browser.Step2 − Launch the URL on which we want to perform the UI testing. For example, driver.get("https://www.tutorialspoint.com/about/about_careers.htm");The above piece of code shall launch the URL passed as a parameter to the get ...

Read More

Modern Web Automation With Python and Selenium

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jun-2021 1K+ Views

We can have modern web automation with Python and Selenium. To configure with Selenium webdriver in Python the steps described below need to be followed −Step1 −To install Python in our system, visit the link − https://www.python.org/downloads/Step 2 − Click on the Download Python button. Once the download is completed, the Python executable file should be available in our system.Step 3 − Double-click on this executable file and the Python installation landing page should be opened. Click on Install Now.Step 4 − Python should be available in the below path −C:\Users\\AppData\Local\Programs\Python\PythonStep 5 − We shall configure the path of ...

Read More

How can I capture network traffic of a specific page using Selenium?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jun-2021 6K+ Views

We can capture network traffic on a specific page using Selenium webdriver in Python. To achieve this, we take the help of the JavaScript Executor. Selenium can execute JavaScript commands with the help of the execute_script method.JavaScript command to be executed is passed as a parameter to this method. To capture the network traffic, we have to pass the command: return window.performance.getEntries() as a parameter to the execute_script method.Syntaxr = driver.execute_script("return window.performance.getEntries();")ExampleCode Implementationfrom selenium import webdriver #configure chromedriver path driver = webdriver.Chrome(executable_path='../drivers/chromedriver') #implicit wait driver.implicitly_wait(0.5) #url launch driver.get("https://www.google.com/") #JavaScript command to traffic r = driver.execute_script("return window.performance.getEntries();") for res in r: ...

Read More
Showing 81–90 of 590 articles
« Prev 1 7 8 9 10 11 59 Next »
Advertisements