Posts

Showing posts from December, 2023

Postman Test Automation with Teamcity

Image
 Teamcity Architecture: Teamcity Installation : Follow this Page for Teamcity Installation. https://www.jetbrains.com/help/teamcity/quick-setup-guide.html Step 1: Check if agent is present or not  Administration > Create Project >Manually (Name ,Project_id)>Create Step 2: Build configurations > Create Build configuration >Manually(Name,Build configuration_id) >create Step 3: New VCS Report  If we are using github repo to pull code we have to this setup Repository url username password  >  Create Step 4: Go to Build Steps > Add build step>command line >step name ,Execute step , Custom script :  node --version                            npm --version                                  newman --version Step 5: Add another build steps (Build config>build steps) ...

Postman Automation with Newman

Image
 Introduction Newman:  The tool that allows us to make the bridge between the Postman App and any CI/CD server is called: Newman. Newman is the CLI companion of Postman,and it can execute Postman collections (as files or from links). Newman Installation: Prerequisite  : Node.js (Java script Run time environment) Link to download :  https://nodejs.org/en/download/package-manager/ > node --version to check Node.js is downloaded or not  To install Newman : https://www.npmjs.com/package/newman >npm install -g newman >newman --version if getting error as :  "File C:\Users\xyzz\AppData\Roaming\npm\newman.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1 + newman --version + ~~~~~~     + CategoryInfo          : SecurityError: (:) [], PSSecurityException     + FullyQua...

Postman Test Automation with Jenkins

 Install Docker  Install jenkins  install postman cli install newman Open Jenkins >install suggested plugins >create admin user  New item >name>freestyle job >Build steps >execute shell >postman --version >postman login --with-api-key {{postman-api-key-here}} >postman collection run 17978790-88a0da8f-3459-4f51-85ec-b4737418a1 //newman --version >save Run ctrl+c : to exit Managing secrets in Jenkins  Manage Jenkins >Credentials>System>Global Credentials>Postman Api Key  Using Postman CLI in Jenkins with Jenkins File New item > Pipeline >ok Go to pipeline configuration  Go to postman >Run collection >Automate Run via CLI>Run on CI/CD >Configuration command >copy configuration from postman (that can be used as script in pipeline) Go back to jenkins pipeline>paste the script To define variable  environment{ POSTMAN_API_KEY = credentials("postman-api-key") } Using Newman in jenkins (Free...