-
-
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
Issue 1793 #1828
Issue 1793 #1828
Conversation
@ptrthomas apologies for the previous PR. Fixes #1793 and #1766. The fix for 1793 was unrelated and I added a workaround. You might have a better idea on how to solve it:
Still pending fixing the unit test on |
Issues are fixed... but still with the workaround using the synchronize on the http headers. My only other thought to avoid the synchronize is to try to use the |
…d (dynamic scenario outline), shared scope, etc. - fixing sharing of HttpRequestBuilder
… work of sharing config across shared contexts
@joelpramos LGTM ! thanks |
@joelpramos I think you are right, so in the graal refactor I am doing now #2009, this approach seems to be working well. created a new branch and working through it - so here's the relevant part of the commit. the I think in this PR you worked on making the http builder be "sharable" across called features. my opinion has always been that when you call a feature, the builder "resets". the only place where the builder can be "half baked" is in the efer this issue: #2054 and this one for examples of the confusion: #1990 so I plan to make this change, let me know if you have concerns. I know we currently have some inconsistent behavior for "dynamic scenario outlines" - so what I plan to do is make everything consistent - which means there will be a question - how do we "setup" a JSON array that can be injected into a "dynamic scenario outline" ? - and I propose to make this the approach, and this is likely to be a breaking change: #1905 |
I think fundamentally I disagree that background should run for each iteration/scenario because of my interpretation of the keyword. Regardless I do agree that inconsistency does no one no good and appears that call once, that other ticket for the JSON data, and maybe some Js and variable replacement on the Examples table covers most scenarios. If we’re making a breaking change might as well be with the Graal refactor which might still bring some surprises. for purposes of discussion - why not change the behaviour of the Background on normal Scenario / Scenario Outline? Do you see background primarily as a section to reduce duplicated instructions for a scenario/test? |
@joelpramos my interpretation of I consider |
I see. Going to junit I think I'd say @BeforeClass. If that's how Cucumber works it's only natural to keep Karate similar as that's where you'll find most of the target persona. I'll take a look into the related tickets and keep an eye on your refactoring branch based on my time. |
Description
Thanks for contributing this Pull Request. Make sure that you submit this Pull Request against the
develop
branch of this repository, add a brief description, and tag the relevant issue(s) and PR(s) below.