1

I am new to Karate and I encounter this issue:

I have this feature class:

Feature: Validate myAPI
 Background:

    * def result = call read('classpath:generateBearerToken.feature')
    * def token = result.bearerToken

    * print "Token is : " + token

   * configure headers = {Authorization: '#(token)'}


  Scenario Outline: Validate POST 
   * configure headers = {Authorization: '#(token)'}

Now, when I print the token from background it comes as it should be but each time I try to run only a specific scenario the token comes as null.

If run the whole class, it works fine but the problem is only when I try to run from the scenario level.

Any help is appreciated!

Thank you!

Constantin
  • 11
  • 1
  • I'm sorry this is the kind of question I hate the most because there is no way for anyone to answer without seeing all your code. so please follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue – Peter Thomas Sep 23 '21 at 17:14

0 Answers0