Skip to content

Overwriting request attributes on content tests #585

Answered by thim81
jpjpjp asked this question in Q&A
Discussion options

You must be logged in to vote

hi @jpjpjp

Portman uses the "assignVariables" in combination, with overwrite. It does not automatically can detect the primary identifier to be used in CRUD operations, since there is no indication for that in OpenAPI. But using the flow, like described below, you can easily have Portman generate ready-to-use variables and use these when making RUD requests.

Have a look at this example (which I used in a meetup):
https://github.com/thim81/spec-driven-openapi-contract-performance-testing/blob/main/testing-contract/config/portman-config-flow.yaml

assignVariables:
  - openApiOperation: POST::*
    collectionVariables:
      - responseBodyProp: id
        name: <tag>Id
  - openApiOperation: G…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jpjpjp
Comment options

Answer selected by jpjpjp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants