最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jmeter - Unable to get the property set in one thread from another thread - Stack Overflow

programmeradmin1浏览0评论

I am setting a property in setUp thread group using ${__setProperty()} and trying to use the same in another thread using ${__property()}

But I get the error which does not give any details. "Error invoking bsh method : eval Sourced file : inline evaluation of"

I just need the value retrieved from a query to be available for the rest of the threads, any suggestion?

I am setting a property in setUp thread group using ${__setProperty()} and trying to use the same in another thread using ${__property()}

But I get the error which does not give any details. "Error invoking bsh method : eval Sourced file : inline evaluation of"

I just need the value retrieved from a query to be available for the rest of the threads, any suggestion?

Share Improve this question asked Mar 11 at 19:15 RajeshSRajeshS 712 silver badges9 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0
  1. Don't use Beanshell for scripting, since JMeter 3.1 it's recommended to use JSR223 Test Elements and Groovy language
  2. Don't inline JMeter Functions or Variables in Groovy scripts, you should rather use propsandvars` shorthands instead

Something like:

props.put("tran_id", vars.getObject("max_transaction_id").get(0).get("id").trim())

should do the trick for you

More information: Using JMeter Variables With Multiple Thread Groups

发布评论

评论列表(0)

  1. 暂无评论