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.

Strange behavior in "Scenario:" section with string interpolation

See original GitHub issue

simple feature:

Feature: Check queue
Background:
* def details = 'Some info'
  Scenario: Check Queue ${details}
      Given url odataUrl
      And path 'Queue'
      And retry until responseStatus == 200 && response.length == 0
      When method get
      Then match response == '#[0]'

gives and error org.graalvm.polyglot.PolyglotException: ReferenceError: "details" is not defined

but if I define details in karate-config.js it works just fine.

    var config = { 
      details: 'some details'
    };

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ptrthomascommented, Jul 28, 2021

@freerider7777 you are welcome to contribute a PR 😃

0reactions
freerider7777commented, Jul 28, 2021

@ptrthomas It will take time… 😃 I’m just starting to play with Karate 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange behavior in "Scenario:" section with string interpolation
js? And btw - it (string interpolation with def variable in Background) works fine in "path" part, but does not work in Scenario....
Read more >
Strange behavior of Julia's lpad function and string interpolation
Your loop counter is called "person" for some reason. So it loops from 1 to 12. From the function docs, the second argument...
Read more >
Dangerous hole in Apache Commons Text – like Log4Shell all ...
Any string interpolation that extracts data from environment variables and then writes it to disk without permission could put you in trouble ...
Read more >
Better Testing with Cucumber - Medium
Let's take a look at the behaviour of the happy path. Scenario Outline: I can validate an OTP Given A valid otp payload....
Read more >
Use variable inside other variable (#1809) · Issues - GitLab
The follow-on issue that solves this use case has a good example of that type of scenario. RAW VARIABLES. For other users coming...
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