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
Not being able to get acces to response when response status is 400 and running in console with maven #286
Comments
can you try 0.7.0.RC4 and see if this is fixed. if not, please follow the instructions here: https://github.com/intuit/karate#fileencoding Really appreciate if you can let me know how it goes. |
closing since the surefire fix will certainly fix this, the main doc has this FAQ / troubleshooting explained as well. |
😃 Thanks Peter, it was encoding issue. I tought I found a "real" bug 😉 |
@adnansarajlic thanks for confirming :) we know that encoding fixes this. what's not clear to us yet it at what point it starts becoming a stream. can you provide this additional info, it will help:
For my reference and for those who come across this issue in future, here is some additional reading: https://issues.apache.org/jira/browse/SUREFIRE-951 |
Yes. I'm running Win10 (Swedish). System file encoding in IntelliJ was windows-1252 but I changed it to UTF-8 an dit did not have any effect. The payload was minimal like the one in example in first post, I was checking error codes. The response is a json with error code, id and message. Response had swedish chars in the message. I did not think about encoding because we are using swedish chars in other responses but maybe first time in combination with response status 400, just guessing. :) Have a nice day! |
@adnansarajlic this helps, thanks ! I think I'll modify the archetype to include the surefire config |
Hi Peter,
I came across a strange issue today. While making a request to an endpoint and expecting status to be 400 with an error everything whent ok in IntelliJ but when I tried to run it with "mvn test" I could not get response to print or match. You can se the line from log:
16:31:10.308 [main] INFO com.intuit.karate - [print] (..stream..)
It's printing (..stream..)
Feature: Test
Background:
* configure headers = read('classpath:headers.js')
* url restUrl
Scenario: Test
Given path 'test'
And request { 'testId': 'TestId1' }
When method post
Then status 400
* print response
The text was updated successfully, but these errors were encountered: