Posts

Variables in Postman

What is a variable? This is the basic question to learn when you start programming. I am not going to dive deep into the programming concepts. Let me explain the variables used in Postman. What is a Variable in Postman? A data unit, that stores a value and it is dynamic based on the data type we use.  Should be written as Key: Value pair (Example: name= "Test"; num=1;) Provides the facility to access the value without manual effort every time. There are 5 different scopes of variables used in Postman. Global Variables Environment Variables Collection Variables Data Variables Local Variables These variable scopes are specially designed to refer to values in the Postman tool. Global Variable:          When the variable is assigned globally, it has all the privileges of accessing anywhere in the workspace such as the Environment, Collection. Environment Variable:          It is limited within the specific environment where you can acce...

Understanding of parseInt() funtion in JavaScript

Image
parseInt() function in javascript is used to parse a string element and returns as an integer.  Syntax: It takes two parameters: String : The string to be converted to an integer. Radix (optional) : An integer between 2 and 36 that represents the base of the numeral system used in the string. This is an optional parameter, and if not specified, JavaScript assumes the following: If the string begins with "0x" or "0X", it is parsed as a hexadecimal number. (Example is given at last). It is always better to specify by the programmers for clarity and understanding.                                             Syntax: parseInt(String,radix) or parseInt(String)   Otherwise, it is parsed as a decimal number.                                     ...

How to Install Jenkins

Image
Jenkins is an open-source Java application server for Continuous Integration and Continuous Delivery (CI/CD). This will run in servlet containers such as Apache Tomcat. It helps the developers to build, test, and deploy the software by automating using CI/CD pipelines. It detects bugs and notifies the developers in an early stage. How to Download and Install: Step 1: Go to https://www.jenkins.io/ . Click Download Step 2: Download Jenkins ‘Generic Java package’. I prefer to download the LTS package (It is a stable one). Step 3: Select your desired path after downloading and save the Jenkins.war file in your local system. Step 4: Go to command prompt (Windows) | Terminal (IOS)                Go to the folder where the war file is saved. Then, type the command java -jar Jenkins.war and run it. It will take a while to run the command. It gives an admin password. Note it down to use Jenkins the first time. The ...

Variety of Keys...

 The power of keys in the real world makes its own purpose. There are different types of keys to operate a lock. Why do we have different types of keys? Because it serves to open a lock made for a specific reason. The most commonly used locks are deadlocks for residential doors and external security, knob locks for internal doors in residences, padlocks for lockers, gates, and sheds, keycard systems for hotels and offices, smart/digital door locks for modern homes and offices, tubular locks for vending machines and ATMs, time locks for bank vaults and safety. When we come into the application, APIs provide connectivity between applications to exchange data and services. To make it secure, we use authentication and authorization.  Authentication allows the user to access the application. Authorization 's main focus is to have the right people to have the right access to the right resources.  We have various authentication types to secure accessing the API in the software ...

Javascript Objects

Objects are everywhere. An object has different meanings such as a thing, material, person or thing's specified action. But when it comes to the programming world, it could be a variable, data structure, method, or function. It usually refers to state and behavior in any context. In Javascript, an object is a collection of keys and values. Keys represent the variable's name and the values are the data stored on the variable. It is considered to be a dictionary. It can have a variable, an object, and even a function in it. We call it an object literal. Javascript is a prototype-based object-oriented language and because of this, each object will have the prototype set by default when assigned along with the Key: Value pair. For example, let me explain with a mobile phone. A mobile phone has many characteristics to describe. We can collate all/few and describe it as a mobile phone. Some variables are brand name, size, color, screen resolution, OS, Storage, and many more. In JS, w...

Essential Checklist for HTTP Requests in API Testing

Image
  This is an attempt to remind you what needs to be checked while sending and retrieving data from an HTTP request in API testing. Method - Ensure the appropriate method (GET, POST, PUT, DELETE, etc.) has been selected to send the request using any tools like Postman, SOAPUI, or Swagger. Host - The host plays a crucial role in hitting the exact server the user wants for the operation. Version of API - The version should be known before hitting the request. It helps to process the data in the deserved endpoint. Path - When the path is provided in the way where exact data is to be stored or updated, it reaches the destination correctly. Endpoint - It is the destination point. Though the entire direction is correct, if the request does not have an accurate endpoint, it leads to retrieving inappropriate data and is time-consuming. Request Payload - Payload is the data provided to the server to process the request correctly. Request Headers - It is crucial for communication between the...

Cookie (Part II)

Image
The basic definition of Cookie is  here . Now, let us dive deep into this topic with everyday life. You have a house named "Happy Home" which is 1000 square feet in size and you have a main door key that is a number lock system. You know the PIN to open your house's main door and the PIN has to be changed periodically. Suppose, today is Nov 2, 2023, and the PIN has to be changed on 1st of Jan, 2024.  Now, you will have three different scenarios. 1) Each room has a separate PIN that includes the main door. Once you open the door, you can access only the living room, and the rest of the rooms are locked and cannot open because you don't know the PIN (to access). 2) The living room and the master bedroom have the same PIN. Once you open the door, you can access the living room and your master bedroom (locked earlier) using the same PIN.  3) The main door has a number lock. The rest of the room doors are already open and have no lock system. In this case, if you open the ...