-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumped openapi-to-postman to the latest version, which includes exten…
…ded assignPmVariables test capabilities Added examples for the test suite assignPmVariables function Added examples for the test suite overwriteRequests function
- Loading branch information
Tim
committed
May 24, 2021
1 parent
d883ad7
commit c0821c6
Showing
10 changed files
with
5,569 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,067 changes: 2,067 additions & 0 deletions
2,067
examples/testsuite-assign-variables/crm.openapi.yml
Large diffs are not rendered by default.
Oops, something went wrong.
2,970 changes: 2,970 additions & 0 deletions
2,970
examples/testsuite-assign-variables/crm.postman.json
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
examples/testsuite-assign-variables/portman-cli-options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"local": "./examples/testsuite-assign-variables/crm.openapi.yml", | ||
"baseUrl": "http://localhost:3050", | ||
"output": "./examples/testsuite-assign-variables/crm.postman.json", | ||
"portmanConfigFile": "./examples/testsuite-assign-variables/portman-config.crm.json", | ||
"postmanConfigFile": "./examples/testsuite-assign-variables/postman-config.crm.json", | ||
"includeTests": true, | ||
"testSuiteConfigFile": "./examples/testsuite-assign-variables/postman-testsuite.crm.json", | ||
"syncPostman": true, | ||
"runNewman": false | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/testsuite-assign-variables/portman-config.crm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"preRequestScripts": [], | ||
"variableOverwrites": { | ||
"application_id": "{{applicationId}}" | ||
}, | ||
"globalReplacements": [ | ||
{ | ||
"searchFor": "\"maxItems\":2,", | ||
"replaceWith": "" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"folderStrategy": "Tags", | ||
"requestParametersResolution": "Example", | ||
"exampleParametersResolution": "Example" | ||
} |
101 changes: 101 additions & 0 deletions
101
examples/testsuite-assign-variables/postman-testsuite.crm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"version": 1.0, | ||
"generateTests": { | ||
"responseChecks": { | ||
"StatusSuccess": { | ||
"enabled": true | ||
}, | ||
"responseTime": { | ||
"enabled": true, | ||
"maxMs": 300 | ||
}, | ||
"contentType": { | ||
"enabled": true | ||
}, | ||
"jsonBody": { | ||
"enabled": true | ||
}, | ||
"schemaValidation": { | ||
"enabled": true | ||
}, | ||
"headersPresent": { | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"assignPmVariables": [ | ||
{ | ||
"openApiOperationId": "GET::/crm/leads/{id}", | ||
"environmentVariables": [ | ||
{ | ||
"responseBodyProp": "data.company_name" | ||
} | ||
] | ||
}, | ||
{ | ||
"openApiOperationId": "leadsAdd", | ||
"environmentVariables": [ | ||
{ | ||
"requestBodyProp": "company_name", | ||
"name": "leadsAdd.company_name" | ||
}, | ||
{ | ||
"responseBodyProp": "data.id", | ||
"name": "leadsAdd.id" | ||
} | ||
] | ||
} | ||
], | ||
"contentChecks": [ | ||
{ | ||
"openApiOperationId": "leadsOne", | ||
"checkRequestBody": [ | ||
{ | ||
"key": "data.company_name", | ||
"value": "{{leadsAdd.company_name}}" | ||
} | ||
] | ||
} | ||
], | ||
"overwriteRequests": [ | ||
{ | ||
"openApiOperationId": "leadsAdd", | ||
"overwriteRequestBody": [ | ||
{ | ||
"key": "name", | ||
"value": "{{leadsAdd.name}}" | ||
} | ||
] | ||
}, | ||
{ | ||
"openApiOperation": "GET::/crm/leads/{id}", | ||
"overwriteRequestPathVariables": [ | ||
{ | ||
"key": "id", | ||
"value": "{{leadsAdd.id}}", | ||
"overwrite": true | ||
} | ||
] | ||
}, | ||
{ | ||
"openApiOperation": "PATCH::/crm/leads/{id}", | ||
"overwriteRequestPathVariables": [ | ||
{ | ||
"key": "id", | ||
"value": "{{leadsAdd.id}}", | ||
"overwrite": true | ||
} | ||
] | ||
}, | ||
{ | ||
"openApiOperation": "DELETE::/crm/leads/{id}", | ||
"overwriteRequestPathVariables": [ | ||
{ | ||
"key": "id", | ||
"value": "{{leadsAdd.id}}", | ||
"overwrite": true | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.