JMeter use beanshell variable in HTTP Request

后端 未结 3 1991
悲&欢浪女
悲&欢浪女 2021-02-19 19:13

I\'m an absolute rookie here (JAVA i mean), spent hours looking for a solution, now i just want to shoot myself.
I want to create a string in the beanshell assertion which i

3条回答
  •  独厮守ぢ
    2021-02-19 19:52

    If you need to pass value from one bean shell sampler to another, you should use variables.

    vars.put("a", "something")
    

    In other sampler, you should have something like:

    String otherSampler = vars.get("a")
    

    About debugging Shell Samplers - It is not so easy. I suggest to use SampleResult object. How to use it, you can see here Debugging Bean Shell Sampler

提交回复
热议问题