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

"Folder" option doesn't results in "bad object passed in config" warning and doesn't restrict run to folder #50

Open
adamkelm opened this issue Feb 25, 2022 · 5 comments

Comments

@adamkelm
Copy link

Using the following steps in the yaml:
steps: - name: Checkout uses: actions/checkout@v2 - name: Run Postman test scripts with Newman - Test Environment uses: matt-ball/newman-action@master with: apiKey: ${{ secrets.postmanApiKey }} collection: 15647561-02887baa-4609-40d1-a02b-3d5a2c943953 environment: 3069900-2bdc0b8d-c45t-4d41-99fa-31c0007e2a98 folder: 15647561-b5653c42-3157-5103-ab6c-d1ce39f05952

Newman runs the entire collection and fails to restrict the run to the selected folder. Prior to the test run, a "Bad object passed in config!" warning appears. The same error occurs whether using UID or folder name, and the same for folders and sub-folders.

2022-02-25T21:26:28.4480643Z ##[group]Run matt-ball/newman-action@master 2022-02-25T21:26:28.4480875Z with: 2022-02-25T21:26:28.4481318Z apiKey: *** 2022-02-25T21:26:28.4481628Z collection: 15647561-02887baa-4609-40d1-a02b-3d5a2c943953 2022-02-25T21:26:28.4481880Z environment: 3069900-2bdc0b8d-c45t-4d41-99fa-31c0007e2a98 2022-02-25T21:26:28.4482123Z folder: 15647561-b5653c42-3157-5103-ab6c-d1ce39f05952 2022-02-25T21:26:28.4482306Z insecure: true 2022-02-25T21:26:28.4482470Z color: on 2022-02-25T21:26:28.4482621Z reporters: ["cli"] 2022-02-25T21:26:28.4482785Z env: 2022-02-25T21:26:28.4482963Z APP_NAME: *** 2022-02-25T21:26:28.4483138Z NAMESPACE: *** 2022-02-25T21:26:28.4483360Z DOCKER_REGISTRY: *** 2022-02-25T21:26:28.4483787Z DOCKER_REPOSITORY: *** 2022-02-25T21:26:28.4484000Z HARNESS_APP_NAME: *** 2022-02-25T21:26:28.4484223Z ARTIFACT_SOURCE: *** 2022-02-25T21:26:28.4484487Z HARNESS_APPLICATION_NAME: *** 2022-02-25T21:26:28.4484746Z HARNESS_PIPELINE_DEV: *** 2022-02-25T21:26:28.4485013Z HARNESS_PIPELINE_TEST: *** 2022-02-25T21:26:28.4485264Z HARNESS_PIPELINE_STAGE: *** 2022-02-25T21:26:28.4485487Z PERFORM_AGAINST: *** 2022-02-25T21:26:28.4485660Z ##[endgroup] 2022-02-25T21:26:28.9440648Z ##[warning]Bad object passed in config! 2022-02-25T21:26:34.5299782Z newman

@matt-ball
Copy link
Owner

I'll update the README to be more specific, but you'll need to provide a stringified array for folder name(s).

e.g.

collection: 15647561-02887baa-4609-40d1-a02b-3d5a2c943953
environment: 3069900-2bdc0b8d-c45t-4d41-99fa-31c0007e2a98
folder: '["15647561-b5653c42-3157-5103-ab6c-d1ce39f05952"]'

@adamkelm
Copy link
Author

None of the other Newman options are in the code samples, so spelling it out explicitly would be extremely helpful. Thanks!

@adamkelm
Copy link
Author

@matt-ball I just tried passing in the stringified id of a folder containing requests. Whether I enter the id of a top-level folder or a sub-folder, the object error is gone, but none of the requests actually run.
Screen Shot 2022-02-28 at 11 08 11 AM

Screen Shot 2022-02-28 at 11 08 20 AM

When I pass in the name of the folder, all the requests in the sub-folder successfully run.

@damitai-clear
Copy link

I had that issue too... took us a long time until we got to this thread... pls update your README 🙏

@miguelb-gk
Copy link

We ran into this same issue too. Took us a while to figure this out.

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

4 participants