Introducing the new Postbot AI assistant and Postman CLI to automate your API testing
Certainly! 😊 Here’s a brief description of Postbot, Postman’s new AI assistant and Postman CLI for API workflows:
Introducing Postbot, Postman’s new AI assistant
Postbot is an artificial intelligence companion developed by Postman, the leading collaboration platform for API development. Leveraging state-of-the-art machine learning algorithms and natural language processing capabilities, Postbot assists developers and testers in creating, managing, and executing API tests seamlessly
Here are some key features of Postbot:
Debugging and Understanding APIs: Postbot acts as your AI companion within Postman workspaces. It helps you debug and understand APIs, allowing you to write tests faster and make sense of large quantities of data.
Test Case Design: Postbot assists in designing better test cases for API calls by understanding the deep context of the APIs you’re working on.
Autocomplete and Suggestions: You can use built-in suggestions to quickly communicate with Postbot or provide more descriptive requests.
Future Enhancements: Postbot’s capabilities will continue to evolve. Soon, it will be able to write API documentation, build test suites from scratch, summarize test data reports, debug API calls, and help you search for relevant API calls within specific workflows.
Postbot will help you design better test cases for API calls, and its understanding of the deep context of the API you’re working on will speed up your API testing workflow. You can use built-in suggestions to quickly tell Postbot what you need, or be more descriptive in your ask:
How to use Postman CLI to run your collections locally
Install Postman CLI Tools
The Postman CLI supports the same operating system requirements as the Postman desktop app. Make sure you installation the latest version of Postman
Run the following commands to install the Postman CLI for Windows. This will download an install script and run it. The install script creates a %USERPROFILE%\AppData\Local\Microsoft\WindowsApps directory if it doesn't exist yet, then installs a postman binary there.
powershell.exe -NoProfile -InputFormat None -ExecutionPolicy AllSigned -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://dl-cli.pstmn.io/install/win64.ps1'))"
Run the following command to install the Postman CLI for Macs with an Apple silicon processor. This will download an install script and run it. The install script creates a /usr/local/bin directory if it doesn't exist yet, then installs a postman binary there.
curl -o- "https://dl-cli.pstmn.io/install/osx_arm64.sh" | sh
Run the following command to install the Postman CLI for Macs with Intel chips. This will download an install script and run it. The install script creates a /usr/local/bin directory if it doesn't exist yet, then installs a postman binary there.
curl -o- "https://dl-cli.pstmn.io/install/osx_64.sh" | sh
Recommended by LinkedIn
Run the following command to install the Postman CLI for the latest Linux version. This will download an install script and run it. The install script creates a /usr/local/bin directory if it doesn't exist yet, then installs a postman binary there.
curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh
Run Postman Collection on Postman CLI Tools
On the Collection Runner, select Automate runs via CLI and Generate your Postman API key or Keep your API key handy if you already have one for easy login. You need the API key to log in on Postman CLI so we can authenticate you and authorize you for running your collections:
Run the following command in from command line make sure you install Postman CLI Tools in that machine and capture postman API key and postman collection ID
Copy the command from Postman CLI code-gen and Paste it to your terminal
postman login --with-api-key PMAK-66584e641f81790001540252-75dca493db672f623d657901xxxxxxxxxx
postman collection run 12434071-8c049e6b-2deb-44fd-b3eb-bb900a743e4e -e 12434071-75269c1d-1da1-4044-b2f2-86xxxxxxxxxx
Run Postman Collection on Jenkins CI/CD
From Postman CLI we can't generate any 3rd party report, after run the collection report will automatically update on in your postman collection run tab
You can integrate your Postman tests with Jenkins using Newman. This enables you to run a Postman Collection and its API tests directly from Jenkins.
For Newman we can create HTML and Allur Report ,
we need to install packege htmlextra and allure report under Nodejs
Conclusion
Postman has introduced Postbot, an AI assistant designed to enhance API development and testing. Postbot leverages advanced machine learning and natural language processing to assist developers with debugging, understanding APIs, and designing test cases. It offers features like autocomplete suggestions and future capabilities for writing documentation and building test suites.
In addition, Postman has released a CLI tool for running API workflows locally. The CLI tool can be installed on various operating systems (Windows, Mac, and Linux) using specific installation scripts. Once installed, users can run Postman collections from the command line, authenticate with their API key, and integrate Postman tests into CI/CD pipelines using Jenkins and Newman. Newman allows for generating detailed reports such as HTML and Allure reports, enhancing the integration and testing process within Jenkins.
Overall, these advancements in Postman’s tools aim to streamline and automate API testing workflows, making them more efficient and effective.