Posts

Showing posts from 2024

Postman Echo - An Easy Way to debug the Postman Requests

Image
While Testing APIs, sometimes we have a situation when we want to debug/know how my input payload goes to the server. I had a similar situation when I was testing a file uploading API using Postman cloud storage files, but on CircleCi it was returning an error with the message - file path not found. So I have to find what input payload it actually sends at that very moment. Here comes to save me - Postman Echo API. Postman Eco API is a public API endpoint with POST method. As its name states, it just returns the input payload you send in the response. So That you can validate, what file path or input value actually sent in the request from the postman. POST   https://postman-echo.com/post So, I found this cool feature really helpful. You don't need to go to other tool or application to debug and check the input payload. You can easily do it using Postman Echo. Hope it will also help you. Let me know your experience with it in comments,  once you use this.

Using Postman Cloud - Test Data Storage for file uploading APIs Collection Run

Image
Last year in Dec. Postman has announced Test Data file storage facility to make file uploading API testing much simpler and share those files among the team, so everyone can directly use them from the cloud storage of Postman without configuring Working directory and placing the files inside it. In case you want to know about the older way, I have already explain older way in last post  . For using Postman shared cloud storage for uploading files and sharing among the team, Please make sure you are using the latest version of Postman desktop application. Similarly, make sure you are using latest version of Postman CLI in-case you are testing file uploading APIs using Postman CLI collection run command. Let's understand now, how we can use this cool new feature of Postman Cloud File Storage, sharing among the team members and using it during the API testing. One can upload a file to Postman File storage Using Postman API request Body - form data To upload files to the Postman c...

Postman Collection Run - How to Test File Uploading API on CircleCi or Jenkins

Image
From last couple of days,  I was doing R&D on how we can test file uploading API on CircleCi or Postman collection Run? Finally, I found a way to test the File uploading APIs using the Postman Desktop app  OR Postman CLI collection run. I have also tested this solution, even on CircleCi for running the automated testing postman APIs by Postman CLI collection run. Here is step by step process, how you can test the file uploading API on CircleCi or Postman collection Run? Local Desktop App settings: Open and go to Local Postman app settings -> General Set working directly location  ( default is postman installation directory but can also choose any other directory ) Place files (to use in file upload APIs during the collection run) in the working directory selected as in the above step and also in the root directory of your project. Now go to the API in which you need to upload a file, and select the file from the working directory selected in step 2. Save that ...

How to Build Nested Tree Structures for Parent-Child using The Laravel Eloquent Relationships

A few days back, working on a Laravel project I had to create an API returning the deeply nested Tree structure for the parent-child relationship of a given object entity - in this case, a Company. Although as an experienced PHP developer, I know how to build Nested Tree Structures for Parent-Child relationships using core PHP and SQL queries. But I was looking to, if Laravel Eloquent provides any efficient inbuilt method to fetch the Parent-child relationship with a deep nested tree structure. This led me to search on ChatGPT for the same. Here I want to give credit to ChatGPT which not only saved my time but also suggested a new way to get the desired result using Laravel Eloquent Relationships. Before I explain the solution for building a Nested Tree Structure, first let's understand it. Understanding Nested Tree Structures: A nested tree structure organizes data in a hierarchical manner, making it easy to represent parent-child relationships. Each node in the tree can have mult...

Challenges and Solutions: Deploying Thoughtworks Tech Radar Node.js + Webpack on Heroku.

A few days back, I got a chance to deploy Thoughtworks Tech Radar  (a Node.js package) on Heroku as our own organization Tech Radar. Although Deploying a Node.js application with Webpack on Heroku can be an easy process, still you may face certain challenges while deploying. Here's a brief rundown of the challenges I have faced and how I tackled them during the deployment process. 1. Missing Procfile One of the initial challenges I faced was forgetting to include a Procfile in my project's root directory. This resulted in Heroku not knowing how to start my application as Heroku uses a Procfile to determine how to run your application. Know more about Procfile To resolve this, I created a simple Procfile that specifies the below command to run my Node.js server. ``` web: npm install --include=dev && npm run dev ``` 2. Heroku-prebuild - command Webpack is commonly used to bundle and optimize JavaScript code for production. However, after the build process, I realized that...