为什么"调试采样器"打破"授权"来自另一个采样器?

时间:2018-06-04 19:14:58

标签: jmeter

正如您在屏幕上看到的那样,当我尝试使用" Debug Sampler"我得到了#34;授权"其他采样器中的问题。但是当我使用" Debug PostProcessor"一切都很好看。谁可以描述第一种行为?非常感谢!

Screen_1

Screen_2

JMeter 4.0 | Java 8

1 个答案:

答案 0 :(得分:1)

If you put Debug Sampler than according to scoping rules

Other elements are hierarchical. An Assertion, for instance, is hierarchical in the test tree. If its parent is a request, then it is applied to that request. If its parent is a Controller, then it affects all requests that are descendants of that Controller. In the following test tree:

Pre Processors are same as Assertion example, all Pre Processors are processed before Sampler (e.g. Debug).

When you put Debug PostProcessor, it doesn't trigger any other elements and therefore in your case access_token and token_type, which are pre processors , execute only when you add Debug Sampler and generate an error because it recreate token when you not expected it.

You can move pre processors under Authorization request so it will be executed only before it