question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support calling a scenario for data set up of dynamic scenario outlines

See original GitHub issue

based on discussion in #1903

As of today this works:

Feature:

@ignore @setup
Scenario:
* def data = [{a: 1}, {a: 2}]

Scenario:
* def temp = karate.call('@setup').data
* match temp == [{a: 1}, {a: 2}]

what needs to work is this:

Feature:

@ignore @setup
Scenario:
* def data = [{a: 1}, {a: 2}]

Scenario Outline:
* print __row

Examples:
| karate.call('@setup').data |

right now the karate.call() fails, there is some work to do in sequencing the call, making sure it runs at the time we init the feature etc. cc @edwardsph @joelpramos

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:24 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
edwardsphcommented, Feb 3, 2022

+1 This is a great solution, thanks.

1reaction
ptrthomascommented, Nov 2, 2022

1.3.0 released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scenario Outline with Examples keyword in #Cucumber (Data ...
Cucumber #CucumberLatest #NaveenAutomationLabsIn this video, I have explained what is Scenario Outline with Examples keyword in #Cucumber ...
Read more >
Dynamic Scenario Outline does not evaluate background ...
When evaluating a dynamic Scenario Outline, the Background section isn't evaluated correctly and the first action in the scenario outline ...
Read more >
Behave: Writing a Scenario Outline with dynamic examples
I've come up with another solution (behave-1.2.6):. I managed to dynamically create examples for a Scenario Outline by using before_feature ...
Read more >
Data Driven Testing Using Examples Keyword in SpecFlow
Examples – All scenario outlines have to be followed with the Examples section. This contains the data that has to be passed on...
Read more >
How do I share multiple scenarios between feature files?
In cases such as these, the set-up and the contents of the scenarios are ... Scenario outlines are the usual way of reducing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found