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

Strange behavior using "path" parameter since 1.2.0 #2023

Closed
kdefives opened this issue May 23, 2022 · 3 comments
Closed

Strange behavior using "path" parameter since 1.2.0 #2023

kdefives opened this issue May 23, 2022 · 3 comments

Comments

@kdefives
Copy link

Hello,

Related to the problem that i commented here (#2012), please found a repository to reprocude the problem locally.

Repo to reproduce the problem: https://github.com/kdefives/karate_path_issue

Java: 18
Maven: 3

Extract from the repo's README:
How to test the strange behavior?

  1. Ensure to use Karate version 1.2.0 inside pom.xml, refresh maven dependencies en then execute the class src/test/java/features/SuiteTest.java (using IDEA for instance).
  2. Normally, you will see the test using path parameter is failing.
  3. Workaround 1: Inside file src/test/java/features/tests/test-feature-fail.feature, if you put the Given path .... after the call read, you will see the test passed. Normal? I do not know.
  4. Workaround 2: Just rollback to Karate version 1.1.0 without any changes, all tests passed perfectly. Regression?

Regards,

@ptrthomas
Copy link
Member

tagging as help wanted a good opportunity for those who want to contribute code and bug-fixes

considering as low-priority because this has been reported only by one or two people

@cheanwei
Copy link

cheanwei commented Jul 3, 2022

I also face similar issue after I update Karate version from 1.2.0.RC1 to 1.2.0. All my tests failed after the upgrade. The "path" variable in the scenario is passed to the called feature file which is being called in configure headers js function. This "path" value is being appended to the url in the called feature file.
If this issue cannot be solved, I have to re-write all my test scenarios using url without path variable.

@ptrthomas
Copy link
Member

@cheanwei this is not a bug in karate and please read this discussion to understand what you need to do differently: #1990

there is not such thing as a path variable. I am closing this issue also because I forgot to earlier

and to all who are reading this - please try to do a test upgrade when we release RC versions in future

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

No branches or pull requests

3 participants