Skip to content

Commit

Permalink
Bumped openapi-to-postman to the latest version, which includes exten…
Browse files Browse the repository at this point in the history
…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
Show file tree
Hide file tree
Showing 10 changed files with 5,569 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANEGLOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v0.0.x - (2021-xx-xx)

### OpenApi-to-postman
Bumped openapi-to-postman to the latest version, which includes extended assignPmVariables test capabilities
Added examples for the test suite assignPmVariables function
Added examples for the test suite overwriteRequests function

## v0.0.4 - (2021-05-18)

### OpenApi-to-postman
Expand Down
2,067 changes: 2,067 additions & 0 deletions examples/testsuite-assign-variables/crm.openapi.yml

Large diffs are not rendered by default.

2,970 changes: 2,970 additions & 0 deletions examples/testsuite-assign-variables/crm.postman.json

Large diffs are not rendered by default.

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 examples/testsuite-assign-variables/portman-cli-options.json
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 examples/testsuite-assign-variables/portman-config.crm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"preRequestScripts": [],
"variableOverwrites": {
"application_id": "{{applicationId}}"
},
"globalReplacements": [
{
"searchFor": "\"maxItems\":2,",
"replaceWith": ""
}
]
}
5 changes: 5 additions & 0 deletions examples/testsuite-assign-variables/postman-config.crm.json
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 examples/testsuite-assign-variables/postman-testsuite.crm.json
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
}
]
}
]
}
Loading

0 comments on commit c0821c6

Please sign in to comment.