Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Am I misunderstanding the use of the option --localPostman? #463

Open
JaredAAT opened this issue Feb 28, 2023 · 2 comments
Open

Am I misunderstanding the use of the option --localPostman? #463

JaredAAT opened this issue Feb 28, 2023 · 2 comments

Comments

@JaredAAT
Copy link

I see that there is an option of --localPostman which isn't overly documented, so I'm probably misunderstanding its use case.

I'm already using https://github.com/postmanlabs/openapi-to-postman to generate a postman file from my OpenAPI spec, so I then assumed that from the generated Postman Collection I could call npx @apideck/portman --localPostman postmanCollection.json to populate the Postman Collection with tests.

Calling it like this, generates:

==============================================================================================================================================================
 Portman Config:  	portman-config.default.json
 Postman Config:  	postman-config.default.json
 Environment:  		.env
 Inject Tests:  	true
 Run Newman:  		false
 Newman Iteration Data: false
 Upload to Postman:  	false
==============================================================================================================================================================
Error: Error initializing OpenApi Spec.
==============================================================================================================================================================

Leaving an empty tmp folder.

I take it ii'm using the option incorrectly or that manipulating an existing postman collection to add tests is not possible?

Cheers

@thim81
Copy link
Collaborator

thim81 commented Jan 8, 2024

hi @JaredAAT

Portman is using https://github.com/postmanlabs/openapi-to-postman behind the scenes, to generate the Postman collection.

Using --localPostman, it would still need the OpenAPI spec for the additional info to generate the tests on.
The OpenAPI is considered the single source, to base it tests on.

A suggestion would be to let Portman generate the Postman collection, skipping using the locally generated Postman collection.

@JaredAAT
Copy link
Author

JaredAAT commented Jan 8, 2024

I don't actually need this functionality anymore as much as i thought i did when posting... but in your documentation it says:

--localPostman             Use local Postman collection, skips OpenAPI conversion

which to my (maybe wrong) reading, suggests i don't need to pass though an OpenAPI file, that I can pass through an already generated postman collection (via https://github.com/postmanlabs/openapi-to-postman) and that it will scan through and attach tests (or whatever you have setup your config to do).

That's my reading of what that option would do anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants