Bird
Raised Fist0
Postmantesting~10 mins

Duplicating and moving requests in Postman - Test Execution Trace

Choose your learning style10 modes available
Test Overview

This test verifies that a user can duplicate an existing request in Postman and move the duplicated request to a different collection. It checks that the duplicated request exists in the target collection and retains the original request's details.

Test Code - Selenium
Postman
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

class TestDuplicateAndMoveRequest(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Chrome()
        self.driver.get('https://web.postman.co')
        # Assume user is already logged in or login steps here

    def test_duplicate_and_move_request(self):
        driver = self.driver
        wait = WebDriverWait(driver, 10)

        # Navigate to the source collection
        source_collection = wait.until(EC.element_to_be_clickable((By.XPATH, "//span[text()='Source Collection']")))
        source_collection.click()

        # Find the request to duplicate
        request = wait.until(EC.element_to_be_clickable((By.XPATH, "//div[contains(@class, 'request-item') and .//span[text()='Test Request']]")))
        request.click()

        # Open request options menu
        options_button = wait.until(EC.element_to_be_clickable((By.XPATH, "//button[@aria-label='Request options']")))
        options_button.click()

        # Click 'Duplicate' option
        duplicate_option = wait.until(EC.element_to_be_clickable((By.XPATH, "//button[text()='Duplicate']")))
        duplicate_option.click()

        # Wait for duplicated request to appear in the same collection
        duplicated_request = wait.until(EC.presence_of_element_located((By.XPATH, "//div[contains(@class, 'request-item') and .//span[text()='Test Request Copy']]")))

        # Drag and drop duplicated request to target collection
        target_collection = wait.until(EC.element_to_be_clickable((By.XPATH, "//span[text()='Target Collection']")))

        # Selenium does not support native drag and drop well, so use JS workaround
        driver.execute_script("var source = arguments[0]; var target = arguments[1];\n            var dataTransfer = new DataTransfer();\n            source.dispatchEvent(new DragEvent('dragstart', {dataTransfer: dataTransfer}));\n            target.dispatchEvent(new DragEvent('drop', {dataTransfer: dataTransfer}));\n            source.dispatchEvent(new DragEvent('dragend', {dataTransfer: dataTransfer}));\n            ", duplicated_request, target_collection)

        # Verify duplicated request is now in target collection
        target_collection.click()
        moved_request = wait.until(EC.presence_of_element_located((By.XPATH, "//div[contains(@class, 'request-item') and .//span[text()='Test Request Copy']]")))

        # Verify the duplicated request retains original details (e.g., method and URL)
        moved_request.click()
        method = wait.until(EC.presence_of_element_located((By.XPATH, "//button[@data-testid='request-method']"))).text
        url = wait.until(EC.presence_of_element_located((By.XPATH, "//input[@data-testid='url-input']"))).get_attribute('value')

        self.assertEqual(method, 'GET')
        self.assertEqual(url, 'https://api.example.com/data')

    def tearDown(self):
        self.driver.quit()

if __name__ == '__main__':
    unittest.main()
Execution Trace - 7 Steps
StepActionSystem StateAssertionResult
1Test starts and browser opens Postman web appBrowser shows Postman web app login or main page—PASS
2Navigates to 'Source Collection' in sidebar'Source Collection' is expanded showing requestsCheck 'Source Collection' is visible and clickablePASS
3Finds and clicks on 'Test Request' in source collection'Test Request' details panel opensVerify 'Test Request' is selectedPASS
4Clicks on request options buttonOptions menu for 'Test Request' is visibleOptions menu contains 'Duplicate' optionPASS
5Clicks 'Duplicate' to create a copy of the requestDuplicated request named 'Test Request Copy' appears in source collectionDuplicated request is present in source collectionPASS
6Drags and drops duplicated request to 'Target Collection''Test Request Copy' is moved under 'Target Collection'Duplicated request is no longer in source collection but in target collectionPASS
7Clicks 'Target Collection' and verifies duplicated request details'Test Request Copy' details panel is openRequest method is 'GET' and URL is 'https://api.example.com/data'PASS
Failure Scenario
Failing Condition: Duplicated request does not appear or cannot be moved to target collection
Execution Trace Quiz - 3 Questions
Test your understanding
What action confirms that the request was duplicated successfully?
AOpening the options menu
BPresence of 'Test Request Copy' in the source collection
CClicking the 'Duplicate' button
DNavigating to the target collection
Key Result
Always verify that duplicated test data retains key attributes and that UI actions like drag-and-drop are confirmed by checking the new location and content.

Practice

(1/5)
1. What is the main benefit of duplicating a request in Postman?
easy
A. It exports the request to a file.
B. It saves time by reusing an existing request setup.
C. It merges two requests into one.
D. It deletes the original request automatically.

Solution

  1. Step 1: Understand duplicating requests

    Duplicating means making a copy of an existing request to reuse its setup.
  2. Step 2: Identify the benefit

    Reusing saves time because you don't have to create the request from scratch.
  3. Final Answer:

    It saves time by reusing an existing request setup. -> Option B
  4. Quick Check:

    Duplicating = Reuse setup [OK]
Hint: Duplicating means copying to reuse quickly [OK]
Common Mistakes:
  • Thinking it deletes the original request
  • Confusing duplication with merging requests
  • Assuming it exports the request
2. Which of the following is the correct way to duplicate a request in Postman?
easy
A. Rename the request with a new name.
B. Drag the request to the trash bin.
C. Click 'Send' button twice quickly.
D. Right-click the request and select 'Duplicate'.

Solution

  1. Step 1: Locate duplication method

    In Postman, duplicating is done by right-clicking the request and choosing 'Duplicate'.
  2. Step 2: Eliminate wrong options

    Dragging to trash deletes, clicking send sends request, renaming changes name only.
  3. Final Answer:

    Right-click the request and select 'Duplicate'. -> Option D
  4. Quick Check:

    Duplicate = Right-click + Duplicate [OK]
Hint: Right-click request to duplicate it [OK]
Common Mistakes:
  • Trying to duplicate by clicking send
  • Dragging request to trash instead of duplicating
  • Thinking renaming duplicates the request
3. Given a collection with requests A, B, and C, you duplicate request B and move the duplicate to a new folder named 'Tests'. What will be the order of requests in the original collection and the new folder?
medium
A. Original collection: A, B, C; New folder: B (duplicate)
B. Original collection: A, C; New folder: B (original and duplicate)
C. Original collection: A, B, C; New folder: empty
D. Original collection: A, B; New folder: C, B (duplicate)

Solution

  1. Step 1: Understand duplication effect

    Duplicating request B creates a copy but does not remove the original from the collection.
  2. Step 2: Understand moving the duplicate

    Moving the duplicate to 'Tests' folder places only the copy there; original stays in the main collection.
  3. Final Answer:

    Original collection: A, B, C; New folder: B (duplicate) -> Option A
  4. Quick Check:

    Duplicate copy moved; original stays [OK]
Hint: Duplicate copies; moving affects only the copy [OK]
Common Mistakes:
  • Assuming original is removed when duplicate is moved
  • Thinking duplicate appears in both places
  • Confusing original and duplicate requests
4. You tried to move a request to another folder in Postman but it did not move. What is the most likely reason?
medium
A. You dragged the request outside any folder accidentally.
B. The request is locked and cannot be moved.
C. You duplicated the request instead of moving it.
D. Postman does not support moving requests between folders.

Solution

  1. Step 1: Check Postman folder behavior

    Postman allows moving requests by dragging them into folders.
  2. Step 2: Identify common mistake

    Dragging outside any folder leaves the request in the original place, so it appears not moved.
  3. Final Answer:

    You dragged the request outside any folder accidentally. -> Option A
  4. Quick Check:

    Drag inside folder to move [OK]
Hint: Drag request carefully inside target folder [OK]
Common Mistakes:
  • Confusing duplication with moving
  • Assuming requests can be locked
  • Believing Postman disallows moving requests
5. You have a collection with 5 requests. You want to create a new folder and move 3 specific requests into it, but also keep duplicates of those 3 requests in the original collection. What is the correct sequence of actions in Postman?
hard
A. Delete the 3 requests, then create new ones in the folder.
B. Move the 3 requests into the new folder, then duplicate them back to the original collection.
C. Duplicate the 3 requests, then move the duplicates into the new folder.
D. Rename the 3 requests and drag them into the new folder.

Solution

  1. Step 1: Understand requirement

    You want duplicates in the new folder and originals to remain in place.
  2. Step 2: Choose correct order

    Duplicating first creates copies; moving duplicates places them in the folder without removing originals.
  3. Step 3: Eliminate wrong options

    Moving first removes originals from collection; deleting loses data; renaming doesn't duplicate.
  4. Final Answer:

    Duplicate the 3 requests, then move the duplicates into the new folder. -> Option C
  5. Quick Check:

    Duplicate first, then move duplicates [OK]
Hint: Duplicate first, then move copies to folder [OK]
Common Mistakes:
  • Moving first removes originals
  • Deleting requests instead of duplicating
  • Thinking renaming duplicates requests
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard