1

Requirement to use a variable defined a scenario should be called in another scenario which cannot be accomplished by karateconfig.js or by initiating it in background Please suggest how can we accomplish this

featurefile1.feature
 feature: sample feature 1
@tag1
scenario: sample scenario 1
* def filename = 'sample file.txt'
* print filename

featurefile2.feature
feature: sample feature 2
Scenario: sample scenario 2
* def  filename1 = call read (featurefile1.feature@tag1)  
* print filename1

the result of feature file2 should be samplefilet.txt

satishsrip
  • 125
  • 3
  • 12
  • it can be acheived by print filename1.filename all the variables defined in scenario can be called call read (featurefile1.feature@tag1) – satishsrip Nov 02 '20 at 17:08

0 Answers0