Is there a way to call/repeat the same endpoint multiple times per "Tag" or when tags are not present? #456
-
First off, this library is amazing! I found it a few days ago and have been using it to automate our postman tests. I'm wondering if it's possible to run the same request multiple times per Tag. For example, I am testing CRUD and would like to run getById multiple times to check things like if the update actually changed the value, or if the delete was successful. Eg, instead of; I'm wondering if this is possible In my case, many tags are dependent on one endpoint, so I used openapi-filter to strip the tags so everything is listed without any folders. Then I used the orderOfOperations to specify the exact order of every endpoint. So it is working well enough to use but I'm still curious. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I don't think we support the case to "copy" operations, there is a workaround that you might experiment with although I'm not a big fan of the method: An alternative could be to create multiple test suites in different Postman collections using Postman A collection: Postman B collection: Postman C collection: The "copy" request sounds like a nice new feature, but it would require some more thought. @nicklloyd What do you think about the "copy request" option? |
Beta Was this translation helpful? Give feedback.
-
Hi sorry guys - am just seeing this thread now. Is this not something you could achieve via the Variation Testing in Portman or (am also just seeing we still don't have docs for) integrationTests? |
Beta Was this translation helpful? Give feedback.
Hi @proper-function
I don't think we support the case to "copy" operations, there is a workaround that you might experiment with although I'm not a big fan of the method:
postman.setNextRequest()
. You could leverageextendTests
to injectpostman.setNextRequest()
in the PUT/POST operations, but again it is complicated.An alternative could be to create multiple test suites in different Postman collections using
orderOfOperations
in combination with the build-in filtering options: https://github.com/apideck-libraries/portman/blob/main/examples/cli-filtering/readme.md#portman-cli-options, which would result in multiple collections like:Postman A collection:
POST
GET
Postman B collection:
PUT
…