[GH-ISSUE #4010] [feature]: pw.env.set should accept integer value #1416

Open
opened 2026-03-16 20:15:56 +03:00 by kerem · 1 comment
Owner

Originally created by @shipko on GitHub (Apr 26, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4010

Is there an existing issue for this?

  • I have searched the existing issues

Summary

I ran into a compatibility issue when importing collections from postman.

The standard query running in postman pm.environment.set("test", 123) does not work when adapting to hoppscotch.

The script
pw.env.set("test", 123) does not work because only string variables are accepted as values.

I suggest adding the ability to add integer variables as well

Why should this be worked on?

Simple engineers may not guess about this feature, the standard function does not work, the credibility of the product will be undermined

Originally created by @shipko on GitHub (Apr 26, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4010 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Summary I ran into a compatibility issue when importing collections from postman. The standard query running in postman `pm.environment.set("test", 123)` does not work when adapting to hoppscotch. The script `pw.env.set("test", 123)` does not work because only string variables are accepted as values. I suggest adding the ability to add integer variables as well ### Why should this be worked on? Simple engineers may not guess about this feature, the standard function does not work, the credibility of the product will be undermined
Author
Owner

@dan4ndrade commented on GitHub (Feb 21, 2025):

Up!
I had the same trouble with numbers.
The workaround is to use .toString() to save the value in environment variables.

<!-- gh-comment-id:2675597282 --> @dan4ndrade commented on GitHub (Feb 21, 2025): Up! I had the same trouble with numbers. The workaround is to use .toString() to save the value in environment variables.
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#1416
No description provided.