Replies: 1 comment 1 reply
-
@armen-ch Could you share your Portman configuration? So that we can try to reproduce it? |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hi,
I'm trying to generate tests from OAS for a microservice which uses Oauth 2 authentication. I want to generate these tests and run them with Newman as an automated test suite.
The OAS file security part is specified as follows:
And below is the generated postman collection generated by Portman
I expect that the “Authentication:'' key with some placeholder value should be injected into a request header which can be then replaced with some _
{{accessToknen}}_
variable. The pre-request script will fetch a token and initialize that variable and I will be able to run the generated contract tests with Newman against microservice providing the bearer token in the requests. But after generating tests from OAS with Portman I see that the authorization token is generated in theoriginalRequest
block of the response. And it looks like it doesn't make sense if running the tests with Newman since I’m getting an unauthorized response from the microservice and the “Authorization header was not found on the request” error in the microservice log. If I manually add the “Authorization” parameter with the token to the header and run the Newman it works.I really liked the Idea of Portman and am currently doing some POC to know if it is possible to use Portman for our testing automation. So I would appreciate any support.
Beta Was this translation helpful? Give feedback.
All reactions