-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cookie check issue (jar & non-jar cookie, potential encoding issue) #772
Comments
@san-ouadghiri Thanks for the report. The slack link has been updated, it expired earlier today. |
Regarding the issues you encountered - the The issue with the broken text in the terminal probably is due to the fact that you want k6 to output binary HTTP response bodies, and the terminal may be affected by special characters in that response. Running |
@robingustafsson > Wo, so I got very unlucky on my slack-access timing :D ! Thanks for that quick link update. @na-- > Thanks for the quick analysis. For the terminal, hopefully k6 can evolve to accompany this kind of situations. In the meanwhile I'll use the reset, that way more useful than rebooting my IDE, so thanks! For the GoError if I narrow the issue I'll let you know as I really need to make that work somehow. Hopefully someone will find the bug root cause soon (>__<). Ping me if you need me to do some test on my code :). |
@san-ouadghiri, I think the problem happens because you try to parse the response as a JSON, i.e. That said, the error message should be much better, but I've created a separate issue for it: #773 |
I'll try that tomorrow morning and let u know. I actually got the .json part from some of the code samples given here*. I now see that some examples have it and some haven't. Not sure if I miss-understand when it should be used, or if the samples are not up to date. Anyway I'll definitively try without and use the doc page you gave me. And thanks for creating 774 :). |
Ah, those docs examples that use |
@na-- , anyone that will one day have this issue > The binary topic |
Thanks @san-ouadghiri, this issue is great, it generates a bunch of things we can improve or fix! 😃 Regarding the We already plan to stop adding the But still, supporting brotli seems a good idea and should be relatively easy, so I've added an issue about it as well: #776 And about the original cookie check issue, the script works when you remove the |
I focused today on a simpler usecase. It allowed me to understand that the accept-encoding header was involved in my binary-drama. But it did not imply cookies. So about that I didn't check yet sorry :(. I'm actually a really basic doc-user I realize XD. I read samples, copy-paste them, play and get how it work on that base. I totally missed that https://httpbin.org/cookies cool page impact and supposed it was generic code for any valid url. Now I got it. But who doesn't cargo-cult this days :D ? I'm happy if this feedback is useful in any way. I'm a QA so I'm always happy to spread the (QA-)love. I'll probably raise more questions (or feature suggestions) in the future as i'd like to use k6 for some projects i look after. So thanks for your work and be prepared for more me hehe :) ! So yep, you can close this ticket. |
Yeah, I know the feeling, I regularly try stuff out and only much later read the docs... Closing this for now, feel free to open new issues if you find anything else. Any feedback is much appreciated! |
Here,'s the issue
Code
Status check alone is ok (fails if not 200, pass if 200). However:
1 - if I uncomment any of the 2 cookie checks, I get an error (see below)
2 - the cookie checks always pass, whatever value they check
3 - if I activate the debug (k6 run --http-debug="full" myscript.js) I got my cookie value :
Cookie: cookieilike=q1epul507; mycookie="hello world" ; does
4 - if I activate the debug mode, the end of my stack seems to go wrong, and it basically mess with my IDE (see screens below).
Error (1)
The value it complains about may vary depending on calls modifications I make. Lines number match the cookie check line.
Issue (4)
![image](https://user-images.githubusercontent.com/28731357/45811001-51693600-bccc-11e8-9ca5-2e2903b13755.png)
![image](https://user-images.githubusercontent.com/28731357/45811040-63e36f80-bccc-11e8-99b5-b8b23600f047.png)
PS: I tired reach through slack, but this page link is "not active anymore" slack says. If you need more info, feel free to ask. I obviously can join a slack chat if this help :).
The text was updated successfully, but these errors were encountered: