jmeter - 显示变量的值 [英] jmeter - showing the values of variables

查看:73
本文介绍了jmeter - 显示变量的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队使用 JM 进行了大量自动化测试.通常我们有一个属性文件,其中定义了一堆变量.这些依次映射到用户定义的变量",其中我们有许多不同的集合.

My group does a lot of test automation with JM. Typically we have a properties file which has a bunch of variables defined. These in turn are mapped to "User Defined Variables" of which we have a number of different sets.

在 jmx 的其余部分都引用了这些 - 我发现很难,因为在这么多不同的地方有这么多变量要知道什么是什么.有什么方法可以让 jmeter 显示其变量的值 - 自定义采样器很好吗?理想情况下,如果您可以将 var 悬停并显示其值,我会喜欢它.

These are in referenced throughout the rest of the jmx - I find it difficult as there are so many variables in so many different places to know what is what. Is there any way to have jmeter display what values its variables have - custom sampler is fine ? Ideally id love it if you could just hover a var and have its value displayed.

有什么想法吗?

推荐答案

最新版本的 Jmeter 有一个很棒的采样器,称为调试采样器",它会显示以下各项的值:Jmeter 变量、Jmeter 属性或系统属性.

The newest versions of Jmeter have a fantastic sampler called "Debug Sampler" that will show you the values for: Jmeter Variables, Jmeter Properties or System properties.

>

您可以在脚本中的任何位置插入它们以在给定时间获取值.您需要启用查看结果树"来查看采样器.

You can insert them wherever you want in the script to get values at a given time. You'll want to have a "View Results Tree" enabled to view the sampler.

鉴于 Jmeter 在运行时从文件中声明变量,您将无法获得理想的解决方案.

Given that Jmeter declares variables from a file on run, you won't be able to get your ideal solution.

我很好奇……使用CSV 数据集配置"而不是从属性文件中填充用户定义的变量"会更简洁吗?

I'm curious...would it be cleaner to employ "CSV Data Set Config" rather then populating "User Defined Variables" from a properties file?

添加了关于变量声明的解释并询问了 CSV 问题.

这篇关于jmeter - 显示变量的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆