-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Value not being passed to reusable feature file #1322
Comments
@theathlete3141 tagging as help wanted. not considering a priority as you are using global variable scope. note that any feature call argument JSON will be auto-added to the scope of the called feature and 0.9.5 behavior could have been a bug. feel free to challenge based on what the documentation says (e.g. shared / isolated scope) |
Thanks @ptrthomas. I'll go back to the documentation so that I can better understand scopes |
I assume you are referring to the scope of the variable If I update
Then although each print statement appears to print the same output, the match statement fails for I believe that 0.9.5 works as intended and that the behaviour of 0.9.6 is a bug. The failing step is seen in |
@theathlete3141 great, now please help debug the code also :) |
@theathlete3141 thank you for raising this and I have fixed it - it was indeed introduced in 0.9.6 I've made sure this fix is in the new version / re-writing - so this helps a lot. it would be good if you can build from source and confirm that it works (the developer guide can be found in the wiki) also the new matching / xml / schema matching code is a lot more maintainable than before - let me know if you want pointers in case you would be interested in trying to improve the XML part where you have found some gaps |
I think all devs are a little protective of their code ;) For completeness, I also want to add that (when not using your fix) using
However using
|
I have checked out the develop branch (commit 2b7be93) and ran
in the root directory. |
1.0 released |
Using karate version 0.9.6, there is a strange issue related to the simultaneous use of reusable feature files, callonce, scenarios, scenario outlines.
The following (
test1.feature
) will failWhere
doSomething.feature
And
doSomethingWithValue.feature
Although
value
is1
(as expected) within the scenario outline, indoSomethingWithValue.feature
it is instead equal to#(value)
. I.e. it printsBasic scenario with value 1
andDo something with value #(value)
.By making minor changes, this can test be made to not fail:
callonce
line (test2.feature
)test3.feature
)callonce
withcall
(test4.feature
)Downgrading to karate version 0.9.5 will also fix this issue.
This can be demonstrated in the attached example project which is run using
myproject.zip
The text was updated successfully, but these errors were encountered: