Integration of the oneOf test in the responseBodyTest #313
jdevosMagento
started this conversation in
Ideas
Replies: 3 comments 3 replies
-
@jdevosMagento This seems like a very good additional contentTest that we could add for Portman. How would you define the configuration in Portman? {
"version": 1,
"contentTests": [
{
"openApiOperationId": "leadsAll",
"responseBodyTests": [
{
"key": "data[0]. string_id",
"oneOf": ["AAA", "BBB"]
}
]
}
]
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
@nicklloyd Any preference to mark the "oneOf" option? In JS it would be |
Beta Was this translation helpful? Give feedback.
2 replies
-
@jdevosMagento We just release Portman v1.17, which includes new content check: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
My API randomly responds an items list, and I want to test an item from this list.
Actually :
My API respond this :
My test :
My problem :
AAA is not always the first result to appear.
On postman it is possible to do a test with for example "to.be.oneOf" :
Is it possible to plan to integrate, as there is already a test "value", "contains", "minLength", "maxLength" this type of test?
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions