I get a value in the response by running one of the scenarios and I would like to use that value in the next scenario. Is there a way to set variables in the context of a feature with karate? I know I can call another feature from within the feaure, but I don't want to move that scenario in another feature and do the call.
Asked
Active
Viewed 4,456 times
1 Answers
0
Please note that having scenarios depend on another is considered a bad practice, and I don't recommend it: https://github.com/intuit/karate#script-structure
But please refer this section on "hooks": https://github.com/intuit/karate#hooks

Peter Thomas
- 54,465
- 21
- 84
- 248
-
I have managed to build my scenarios so I avoid the dependency, but thanks for the suggestion! – cris Jan 14 '19 at 17:46
-
@cris how did you achieve this? i need to do the same – astar Jun 14 '22 at 21:05