vendredi 28 août 2020

How to validate and print non-json response using Karate

I am getting '1' in response body and not able to print it on console and neither validate it

below are the details of response body and console output:

Scenario

Scenario: Sample Scenario 

Given path '/SomePath'
When method get
Then status 200
And print 'Service Response is: ' + response

Response body: Below Image shows the Service Response

Console output for print:

[ForkJoinPool-1-worker-1] INFO com.intuit.karate - [print] Service Response is:

Console output for validation :

ERROR com.intuit.karate - assertion failed: path: $, actual: '', expected: '1', reason: not a sub-string

Aucun commentaire:

Enregistrer un commentaire