Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Feature Request - Skip certain postman paths #77

Closed
thim81 opened this issue Jan 8, 2021 · 1 comment
Closed

Feature Request - Skip certain postman paths #77

thim81 opened this issue Jan 8, 2021 · 1 comment

Comments

@thim81
Copy link
Contributor

thim81 commented Jan 8, 2021

Hi,

In postman, we typically have a range of CRUD operations (including DELETE).

Our aim is to use the K6 script in a continuous integration Azure pipeline, where after each push to GIT > we convert our OpenApi spec (with examples) to a postman collection > which we convert to a K6 script (using the excellent postman-to-k6) > which we then trigger to execute "K6 run" to run a loadtest

I'm looking for a manner to skip certain POSTMAN operations/paths (like DELETE)
Do you have any pointers?

An alternative could be that, I use the --separate option (like postman-to-k6 collection.json --separate -o k6-script.js )and then define in my Azure pipeline which files to execute.

steps:
  - task: k6-load-test@0
    inputs:
      filename: 'k6-script_1.js'

  - task: k6-load-test@0
    inputs:
      filename: 'k6-script_2.js'

Or is there another way to be able to skip certain postman paths from being executed by the K6 run?

@thim81
Copy link
Contributor Author

thim81 commented Jan 9, 2021

I have find a work-around by leveraging https://github.com/Mermade/openapi-filter

Via this openapi-filter package, I can filter out all unwanted paths/operations/tags before I convert it into Postman.

So the pipeline will go like this:
where after each push to GIT

  1. we filter out specific OpenApi operationIds (via the OpenApi-Filter package)

  2. we convert our filtered OpenApi spec (with examples) to a postman collection

  3. which we convert to a K6 script (using the excellent postman-to-k6)

  4. which we then trigger to execute "K6 run" to run a load test

@thim81 thim81 closed this as completed Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant