[GH-ISSUE #5477] [feature]: Support for Parent Collection-Level Scripts #2102

Open
opened 2026-03-16 23:12:12 +03:00 by kerem · 1 comment
Owner

Originally created by @Leon-Luu on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5477

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Summary:
Currently, Hoppscotch does not support the ability to create and manage scripts at the parent collection level. This feature is available in tools like Postman and is highly valuable for managing complex API testing workflows. We would like to request the addition of parent collection-level scripting capabilities in Hoppscotch.

Description:
In many API testing scenarios, it is crucial to define scripts that apply to all requests or child collections within a parent collection. This enables users to centralize logic, reduce duplication, and streamline test maintenance. However, Hoppscotch currently restricts scripting to the individual request or environment level, which leads to repetitive code and increased management overhead.

Why should this be worked on?

Centralized Environment Setup:
Ability to generate or modify environment variables (such as tokens, URLs, or configuration values) that automatically propagate to all child collections and requests. This is useful for setting up authentication, base URLs, or other shared context.

Chained Requests for Shared Data:
Support for chaining requests at the parent collection level to fetch tokens, session data, or payloads that are needed by multiple requests within the collection. For example, retrieving an OAuth token once and using it across all child requests.

Reusable and Common Scripts:
Define common pre-request or test scripts (e.g., logging, validation, error handling) that should run for every request in the collection, ensuring consistency and reducing duplication.

Originally created by @Leon-Luu on GitHub (Oct 10, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5477 ### Is there an existing issue for this? - [x] I have searched the existing issues ### Summary **Summary**: Currently, Hoppscotch does not support the ability to create and manage scripts at the parent collection level. This feature is available in tools like Postman and is highly valuable for managing complex API testing workflows. We would like to request the addition of parent collection-level scripting capabilities in Hoppscotch. **Description**: In many API testing scenarios, it is crucial to define scripts that apply to all requests or child collections within a parent collection. This enables users to centralize logic, reduce duplication, and streamline test maintenance. However, Hoppscotch currently restricts scripting to the individual request or environment level, which leads to repetitive code and increased management overhead. ### Why should this be worked on? **Centralized Environment Setup**: Ability to generate or modify environment variables (such as tokens, URLs, or configuration values) that automatically propagate to all child collections and requests. This is useful for setting up authentication, base URLs, or other shared context. **Chained Requests for Shared Data:** Support for chaining requests at the parent collection level to fetch tokens, session data, or payloads that are needed by multiple requests within the collection. For example, retrieving an OAuth token once and using it across all child requests. **Reusable and Common Scripts:** Define common pre-request or test scripts (e.g., logging, validation, error handling) that should run for every request in the collection, ensuring consistency and reducing duplication.
Author
Owner

@GuryYu commented on GitHub (Nov 13, 2025):

very useful feature

<!-- gh-comment-id:3525863333 --> @GuryYu commented on GitHub (Nov 13, 2025): very useful feature
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2102
No description provided.