Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

PostMan UI Shows a Variable with a Strikethrough Text After Test

I run a PostMan query and receive a Bearer Token. The test sets the global variable named BearerToken as such:

if (responseBody !== "undefined")
{
     tests["Bearer Token = " + responseBody] = true; 
     pm.globals.set("BearerToken", responseBody);  
}

When I view the values in the eye button it shows the Current Value text with a strikethrough:

enter image description here

Upon the next query which uses the BearerToken, it works.

What is the meaning of the Strikethrough?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

A strikethrough on a variable would suggest that a variable of the same name is currently in a different scope (Collection, Global or Environment)

By using the {{..}} variable syntax in the request, you will be able to a list of the variables with the same name and which one the request is using.

enter image description here

https://learning.postman.com/docs/sending-requests/variables/#variable-scopes


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...