I would like to compare the text file, however the API is returning application/octet-stream which I cannot change currently. That's why karate probably tries to compare the binary and test. That means this:
Given path '/download/testing/'+fileId
When method get
Then status 200
And match response == read('../files/test.txt')
leads to:
match failed: EQUALS
$ | data types don't match (LIST:STRING)
[116,101,115,116,105,110,103]
'testing'
The file test.txt contains just testing
. I cannot find the way how to convert string to byte array. I could use probably java function, but at first I would like to find out if there is some built-in function.