Skip to content
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

raw path concatenates instead of replacing between subsequent calls #1635

Closed
zgael opened this issue Jun 11, 2021 · 1 comment
Closed

raw path concatenates instead of replacing between subsequent calls #1635

zgael opened this issue Jun 11, 2021 · 1 comment

Comments

@zgael
Copy link

zgael commented Jun 11, 2021

Hi,
having a lot of tests under the old format path 'foo/bar/baz', I tried to play with raw path, to try and check if my old test work without rewriting to path 'foo', 'bar', 'baz', which I personnally found a lot less clear (this is not the place to debate that though).

Using karate version : 1.1.0.RC2

And I found out that when I have 2 HTTP calls using path raw in the same scenario, the paths are getting concatenated, while I expected it to be replaced.

See example below :

Given url 'http://httpbin.org'
And raw path 'anything/dog'
When method GET
Then status 200
And match response.url == 'http://httpbin.org/anything/dog'

Given url 'http://httpbin.org'
And raw path 'anything/cat'
When method GET
Then status 200
And match response.url == 'http://httpbin.org/anything/cat' # TEST FAILS, actually it is http://httpbin.org/anything/dog/anything/cat

This might be a misunderstanding from me, as raw path is not yet documented, but I feel it shouldn't behave like that.
I made the same test using two different scenarios, and raw path works as I expect it.

@ptrthomas
Copy link
Member

@zgael hey. please debate this at #1561 most likely I'm giving up on the whole path change fiasco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants