-
-
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
background executed for each row even for dynamic scenario outline #1793
Comments
I once fixed it but for some reason had to go back to this behaviour which keeps consistency with the “normal” scenarios. Can’t remember where we discussed this (maybe in PR code review) but my gut feeling / wishful thinking is that it was done in the battle against Graal variables shared across context in multi threads. Give it a shot at reverting that line and unit test in this commit: |
@joelpramos thanks, yes I kind of remember that. will take a look if someone does not pick this up for hacktoberfest perhaps a solution or workaround may be to use just a thought, maybe we should intro a EDIT: don't think we will go down that route but better tag is Feature:
Background:
* print 'in background'
* def fun = function(){ karate.log('in fun'); return [{ foo: 'one' }, { foo: 'two' }] }
* def data = callonce fun
Scenario Outline:
* print 'in row', __row
Examples:
| data | |
I just tried workaround mentioned - but it's printing more than once. 04:41:08.248 [main] DEBUG com.intuit.karate.Suite - [config] classpath:karate-config.js 04:41:10.459 [main] INFO com.intuit.karate - [print] in background |
@naganjaneyuluyazali works for me on the |
@naganjaneyuluyazali maybe you will be interested to contribute code to fix this :) |
I'm very good at breaking the things as Quality guy :) but not yet fixing the code. |
@naganjaneyuluyazali and I think you missed my point. the print of |
okay got it ...intially I thought the temp fix you provided is for not re-doing Background . |
@naganjaneyuluyazali not until the bug is fixed :) |
Can I be part of your karate developers community |
@naganjaneyuluyazali can you validate with the latest in develop? |
It's working now ..thank you nd developers for the fix. |
1.2.0 released |
here's a single feature to replicate. thanks to @naganjaneyuluyazali who reported this in #1792
and the
print
is seen 3 times:@joelpramos this is a surprise to me, I thought we were not re-doing
Background
in this caseThe text was updated successfully, but these errors were encountered: