Open
Conversation
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Agent-Logs-Url: https://github.com/kobenguyent/newman/sessions/15ff4831-9b08-443d-8cb4-d68b72ee4dd0
…e both specified via --folder Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Agent-Logs-Url: https://github.com/kobenguyent/newman/sessions/e6ab8a99-b00d-4032-85eb-7a73d35b7959
…ted scenario) Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Agent-Logs-Url: https://github.com/kobenguyent/newman/sessions/6eddf2da-3362-4fc9-b10e-26806dbf74d0
Agent-Logs-Url: https://github.com/kobenguyent/newman/sessions/10c280d4-76d7-4c74-96f0-f5492ab7879e Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Newman had a bug where specifying both a parent folder and one of its non-direct nested descendants via
--foldercaused the descendant's requests to execute twice. Additionally, there was no test coverage for the--folderoption when targeting nested folders.Root Cause
When
postman-runtime'sfindItemsOrGroupstraverses a non-matching intermediate folder (e.g.Parent → Intermediate → DeepNested), it resets the_continueAccumulationflag totruefor that branch. This causesDeepNestedto be accumulated even whenParent(which already covers it) is also specified — making its requests execute twice.Changes
lib/run/index.js— Added two private helpers and applied deduplication before entrypoint construction:findItemOrGroupById()— recursively locates a folder or request in the collection by id or namededuplicateFolders()— for each folder in a multi-folder list, walks up the parent chain to check whether any ancestor is also in the list; if so, removes the descendant (since running the ancestor already covers all its children)deduplicateFolders()in the entrypoint construction block before themultipleIdOrNamelookup strategy is invokedtest/library/folder-variants.test.js— Added fixture collections and anested foldersdescribe block with 8 tests covering:folder: '1.2 Hello2'folder: ['1.2 Hello2']multipleIdOrNamestrategy)