jmeter不将变量保存到CSV或XML文件中 [英] jmeter not saving variables into CSV or XML files

查看:253
本文介绍了jmeter不将变量保存到CSV或XML文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是jmeter的新手.

I'm new to jmeter.

我知道我可以编辑jmeter.properties并指定对于任何给定的测试运行,jmeter将保存到其输出文件中的自定义"变量的名称.

I understand that I can edit jmeter.properties and specify the names of "custom" variables that jmeter will save into its output files, for any given test run.

我已经编辑了jmeter.properties以包含以下行:

I've edited jmeter.properties to include this line:

sample_variables=DURATION

并且我还编辑了我的测试计划,以包括一个正则表达式提取器,该提取器从每个响应中提取一个值并将其填充到该名称的变量中.

and I've also edited my test plan to include a Regular Expression Extractor that extracts a value from each response and stuffs it into a variable of that name.

我还添加了一个简单数据编写器",以告诉jmeter将其收集的数据写入文件.

I also added a "Simple Data Writer" to tell jmeter to write the data it collects to a file.

成功创建了输出文件,但其中不包含我提取的变量.

The output file gets created successfully, but it does not contain the variable I extracted.

我做错了什么?

我发现这对Google来说是不可能的,因为保存jmeter变量"并不能充分限制这种情况.

I'm finding this impossible to google, because "save jmeter variable" doesn't constrain the situation nearly enough.

推荐答案

我的糟糕.

Jmeter正在写出该变量. 我必须重新启动jmeter才能使其正常工作.

Jmeter was writing that variable out. I had to restart jmeter to get it to work.

在输出文件的开头,我被误导了-它包含了我重新启动该工具之前的运行结果.删除现有的输出文件后,输出文件中的新内容显示了我期望的变量.

I was misled by looking at the top of the output file - it contained output from a prior run, prior to my restart of the tool. After I Removed the existing output file, the new content in the output file showed the variable I expected.

这篇关于jmeter不将变量保存到CSV或XML文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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