postman-collection-runner

Request reuse in Postman

南笙酒味 提交于 2021-02-19 15:00:25
问题 Our team wants to automate our REST API testing. Right now, we have a collection of Postman requests and make them jump through hoops manually. We could create a collection/folder for each testing scenario, but that would mean a ton of duplication. Our API is still under heavy development and I really don't want to fix the same thing at twenty places after it changes. I would like to have each endpoint request only once in a collection and some kind of independent logic that can execute them

Request reuse in Postman

我们两清 提交于 2021-02-19 14:48:20
问题 Our team wants to automate our REST API testing. Right now, we have a collection of Postman requests and make them jump through hoops manually. We could create a collection/folder for each testing scenario, but that would mean a ton of duplication. Our API is still under heavy development and I really don't want to fix the same thing at twenty places after it changes. I would like to have each endpoint request only once in a collection and some kind of independent logic that can execute them

In Postman, how to POST binary file use collection runner

随声附和 提交于 2021-02-09 03:17:49
问题 I am using the Postman Collection Runner to automate a series of API calls. On one of these API calls I need to submit a binary file as the body of a POST. When setting up the Collection Runner I see how to select a file, but I can't figure out how to attach that file to the body of the POST request in the "Pre-request Script". Is it possible in a "Pre-request Script" to load a binary file into the "data" object? 回答1: Currently postman collection runner doesn't support file uploads. You will

Is there any way to run a test script after each request in Postman Collection?

余生长醉 提交于 2021-02-08 11:53:20
问题 I am working on a Restful API that creates a new token after each request. So, in Postman I am refreshing my token environment variable after each request in Tests like following: pm.test("Successfull Login Test", function () { pm.expect(pm.response.text()).to.include('"result":"success"'); var res = pm.response.json(); pm.environment.set("token", res.token); }); I wonder if it is possible to do this operation for all collection items? I mean I want to say to Postman, run this script after

Postman - Access Token Retrieval using Authorisation Code grant type

假如想象 提交于 2021-02-07 19:51:14
问题 I have set up a release pipeline to automatically deploy an API artefact to a particular domain, and as part of that pipeline I have introduced the execution of a postman collection via the Newman CLI, the ultimate goal that I want to achieve with this is a post-deployment "integration test". My API is secured using Identity Server 4 and there is a client created that uses the grant type "authorisation_code" I am able to manually create an access token through the "Get New Access Token"

ERROR npm ERR! errno 126, when running postman collections using maven in Jenkins

混江龙づ霸主 提交于 2021-01-29 07:45:14
问题 *I am trying to run postman collections using Maven in Jenkins. I get below errors when the pipeline is run. I can run these locally with 'mvn clean verify' in intellij and all tests run successfully. I am bit lost as how to solve this issue and looking for some help.:- [INFO] --- frontend-maven-plugin:1.6:npm (merge) @ ihtests --- [INFO] Running 'npm run shipment-tests' in /var/jenkins/workspace/com.tcel_intests_merge/temp [INFO] [INFO] > postman-newman-jenkins@1.0.0 shipment-tests /var

How to pass variables from JSON to postman body

纵饮孤独 提交于 2020-04-13 04:40:06
问题 I want to parameterized my tests in Postman. This is the example body of POST request: { "entity_id": "{{entity_id}}", "text": data.comment_name } entity_id is global variable and it works correctly, but I want to set value of text from JSON file. data.comment_name doesn't work it saved me exactly data.comment_name as text variable. I want to include this JSON file with all variables in collection runner. How can I do that? 回答1: If your data file looks something like this JSON example: [ {

How to pass variables from JSON to postman body

﹥>﹥吖頭↗ 提交于 2020-04-13 04:39:08
问题 I want to parameterized my tests in Postman. This is the example body of POST request: { "entity_id": "{{entity_id}}", "text": data.comment_name } entity_id is global variable and it works correctly, but I want to set value of text from JSON file. data.comment_name doesn't work it saved me exactly data.comment_name as text variable. I want to include this JSON file with all variables in collection runner. How can I do that? 回答1: If your data file looks something like this JSON example: [ {

Running a request in Postman multiple times with different data only runs once

拜拜、爱过 提交于 2020-02-01 07:34:00
问题 I am new to Postman and running into a recurrent issue that I can’t figure out. I am trying to run the same request multiple times using an array of data established on the Pre-request script, however, when I go to the runner the request is only running once, rather than 3 times. Pre-request script: var uuids = pm.environment.get(“uuids”); if(!uuids) { uuids= [“1eb253c6-8784”, “d3fb3ab3-4c57”, “d3fb3ab3-4c78”]; } var currentuuid = uuids.shift(); pm.environment.set(“uuid”, currentuuid); pm

Running a request in Postman multiple times with different data only runs once

守給你的承諾、 提交于 2020-02-01 07:32:06
问题 I am new to Postman and running into a recurrent issue that I can’t figure out. I am trying to run the same request multiple times using an array of data established on the Pre-request script, however, when I go to the runner the request is only running once, rather than 3 times. Pre-request script: var uuids = pm.environment.get(“uuids”); if(!uuids) { uuids= [“1eb253c6-8784”, “d3fb3ab3-4c57”, “d3fb3ab3-4c78”]; } var currentuuid = uuids.shift(); pm.environment.set(“uuid”, currentuuid); pm