In Karate DSL, I have the following scenario:

Feature: Test

Background: * url baseUrl

Scenario: Test

Given path 'serviceRequests/tasks?view=short&page=1&size=25

With GET method I get a status as 200

I am getting a response of 404 because this is what Karate is converting the path variable a below. Notice the 'tasks?' string becomes 'tasks%'. Why is this happening and what can I do to resolve it?

GET http://ver-01-shared-services-service-request-service.ver.cloud.ds.gehc.net/serviceRequest/v1/serviceRequests/tasks**%**3Fview=short&page=1&size=25

1

There are 1 answers

0
Peter Thomas On BEST ANSWER

Use the proper way to set parameters:

Given path 'serviceRequests', 'tasks'
And param view = 'short'
And param page = 1
And size = 25
When method get
Then status 200