-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postman to k6 issue - Postman sends value as number, k6 sends value as string #137
Comments
Hi @Adrian-2705 That is indeed not the desired behaviour. Would it be possible to share your postman collection so we can use it for debugging the conversion? I ll look into it when back from vacation. |
Hello @thim81 , |
hi @Adrian-2705 The reason it is using "string" values, is because in your Postman request you wrapped the Postman variables in "" which makes them strings. If you remove the "" around your variables, Postman and K6 will handle them as Number values. |
Hello @thim81,
|
hi @Adrian-2705 The goal of the postman-to-k6 converter is that it generates the correct K6 scripts. When doing the investigation, I used your Postman collection and made the elements unquoted, which led to the expected K6 scripts. So I'm surprised that you still ran into issues. If you have more info to share, on what you had to correct so that I can review any changes in the postman-to-k6 converter? |
Hi @thim81 |
It might be helpfull for your debugging to trigger k6 with example => |
Will use it, thank you |
hi @Adrian-2705 Did you find anything that explains the behaviour or were able to reproduce or overcome it? |
Hi @thim81 ,
/ \ | |\ \ | (‾) |
INFO[0000] Request: event_data=map%5Bdocument_id%3A81890+validation_request_id%3A545851+validation_status%3Avalidated%5D&event_timestamp=1724861529&event_type=document.validation.response group= iter=0 request_id=cfa91ce2-1536-44dd-5c77-8934a4de151b scenario=default source=http-debug vu=1 {"errors":["Invalid event timestamp"]} group= iter=0 request_id=cfa91ce2-1536-44dd-5c77-8934a4de151b scenario=default source=http-debug vu=1 Hope it helps, As I said, I've managed to write the code manually for what I am testing without the convertion. It would've been a time saver if it worked. |
Hi all!
I have an issue with a converted test from Postman to k6.
In Postman I am sending a payload body that has a number as a value, and the test passes, but the converted test in k6, sends the value as a string and the test fails.
The issue here is that it needs to be a number, not a string, for the test to pass.
The text was updated successfully, but these errors were encountered: