Collection variables support #127
-
I'd like to clarify whether the tool supports collection variables? It doesn't seem to at the moment.
So it's not called out in the supported features but it's also not mentioned in unsupported features section. I'm sure we've used the tool in the past to include collection variables but maybe we had some other workaround that I wasn't aware of (can't find the old example as it's since been refactored). We're using collection variables because it makes a neat exportable unit that can be imported without loading separate environment variables. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
postman-to-k6 support collection variables. In the readme, there is a example on how to use them: Does this help you? |
Beta Was this translation helpful? Give feedback.
-
Hi, @thim81 Thanks for getting back to me, appreciate it. I was aware of the capability to export global variables into a file and import them into the script. Collection variables are slightly different because they are not exported like that but as part of the collection. Looking into it further for some reason the collection I was trying to convert didn't include the collection variables in the postman export, presumably my error. I've re-exported the collection and postman-to-k6 converts this and the variables are used when I run the output in k6. So it was probably something I did wrong in the original export. Cheers |
Beta Was this translation helpful? Give feedback.
Hi, @thim81
Thanks for getting back to me, appreciate it. I was aware of the capability to export global variables into a file and import them into the script. Collection variables are slightly different because they are not exported like that but as part of the collection. Looking into it further for some reason the collection I was trying to convert didn't include the collection variables in the postman export, presumably my error. I've re-exported the collection and postman-to-k6 converts this and the variables are used when I run the output in k6. So it was probably something I did wrong in the original export.
Cheers