Substituting a variable value in ATF REST request inbound
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 11:46 AM
Here is the complete scenario.
I have an requirement for API testing through REST steps in ATF. In which the authentication is of token type where the token expires every 15 days and I have like 40 to 50 scenarios where I need to use this token.
My idea is to declare this token using Server side script and then in REST api inbound step add a header called Authorization and user this token by declaring that variable which I declared in previous step.
Example: Authorization: ${token}
As I tried the header is not substituting the value instead it is taking as ${token}.
I tried different syntax but none of them worked.
My requirement is to declare a token value in one test step and in the next step call that variable in the header section of the api call and substitute the token value.
Thanks in advance.🙂