-
What is the best way to configure Portman to generate a Postman collection, that can be used by K6 via postman-to-k6. Flow: OpenAPI -> Postman -> K6 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
K6-ready Postman collectionWhen leveraging Postman to generate K6 tests (via postman-to-k6 package), K6 throws the following error The test name is build up using multiple parts: The multiple parts are useful for visual scanning the tests in Postman and in Unit test reports. The "::" is being used as since it references the Portman targeting (https://github.com/apideck-libraries/portman#portman-targeting). K6 cannot handle the generated test names with "::" in. The following options can will generate a K6-safe Postman collection. Configure Portman Globals to a use different separatorSymbol than the default {
"globals": {
"separatorSymbol": "=="
}
} OR use use the rawReplacements globals to find and replace the generated "globals": {
"rawReplacements": [
{
"searchFor": "::",
"replaceWith": ":-:"
}
]
} K6 TestsK6 is a performance testing tool, while Postman is suited for Contract testing. So when generating the Postman collection that will be used for K6, it is unnecessary to validate all the contract tests at scale. So typically, the Portman test configuration can be reduced to use: |
Beta Was this translation helpful? Give feedback.
K6-ready Postman collection
When leveraging Postman to generate K6 tests (via postman-to-k6 package), K6 throws the following error
group and check names may not contain '::'
because the generated tests usepm.test("[POST]::/portal/v1/tenants/:tenantId/accounts - Status code is 2xx", function ()
uses "::" (as a seperator between the method & path).The test name is build up using multiple parts:
[API method] :: API endpoint url - Test name
The multiple parts are useful for visual scanning the tests in Postman and in Unit test reports.
The "::" is being used as since it references the Portman targeting (https://github.com/apideck-libraries/portman#portman-targeting).
K6 cannot handle the …