Forum Discussion

Shekhar's avatar
Shekhar
New Member
2 years ago

Header variable name change at API level is not reflecting in all test steps in test cases

Hello Team,

 

I would need help on header values propagation to all the test steps in test cases .

 

Ex: In API level we have headers as 

       Header  AND   Value

         Hkey1     -      Hvalue1 .

    But I need to update the Header key as "Hkey1" instead of  "Hkey1" and this updated header variable need to be propagated to all the test cases in that project .

 

Could you please help me on this .

 

Thanks,

 

1 Reply

  • KarelHusa's avatar
    KarelHusa
    Champion Level 2

    Shekhar,

    you can make project variables HeaderKey and HeaderValue and then use them as:

     

    ${#Project#HeaderKey}
    ${#Project#HeaderValue}

    in your tests. Then you can change both header key and value anytime you need. 

     

    If you only need to make a one-off change in your project, you can do that by find/replace in the project file(s) or by Groovy scripting (more complex).