首页
\
问答
\
我应该在我的自定义代码之前或在我覆盖方法之后调用super.xxxx()吗?(should I call super.xxxx() before my custom code or after when I override a method?)
我应该在我的自定义代码之前或在我覆盖方法之后调用super.xxxx()吗?(should I call super.xxxx() before my custom code or after when I override a method?)
我应该在我的自定义代码之前或在我覆盖方法之后调用super.xxxx()吗?
是否有识别技能?should I call super.xxxx() before my custom code or after when I override a method?
Is there some skills to Identify?
原文:https://stackoverflow.com/questions/10778997
更新时间:2022-09-23 17:09
最满意答案
您需要执行以下操作:
- 执行第一个请求到
http://servername/request?rt=xml&c=12&s=skxil
- 添加正则表达式提取器后处理器以将数据提取到JMeter变量
- 使用JMeter变量作为下一个请求的参数
配置示例:
正则表达式提取器
- 参考名称 - 任何有意义的东西,即
rh
- 正则表达式 - 在你的情况下它会像
rh=(.+?)]]
- 模板 -
$1$
剩余字段可以留空。
第二个HTTP请求采样器
- 服务器名称或IP -
http://servername
- 路径 -
/mdtrack
- 参数名称 -
rh
- 参数值 -
${rh}
最后2个参数应转到“使用请求发送参数”部分
一些有用的链接:
- 您可以使用Jakarta ORO Demonstration applet测试您的正则表达式
- 您可以使用Debug Sampler和View Results Tree侦听 器的组合来查看JMeter Variables值
- 有关如何创建正则表达式的请参阅正则表达式的JMeter手册
You need to do the following:
- Execute first request to
http://servername/request?rt=xml&c=12&s=skxil
- Add Regular Expression Extractor Post Processor to extract data to JMeter Variable
- Use JMeter variable as a parameter for next request
Example configuration:
Regular Expression Extractor
- Reference Name - anything meaningful, i.e.
rh
- Regular Expression - in your case it'll be something like
rh=(.+?)]]
- Template -
$1$
Remaining fields can be left blank.
Second HTTP Request Sampler
- Server Name or IP -
http://servername
- Path -
/mdtrack
- Parameter name -
rh
- Parameter value -
${rh}
Last 2 parameters should go to "Send Parameters With The Request" section
Some useful links:
- You can test your Regular Expressions using Jakarta ORO Demonstration applet
- You can use combination of Debug Sampler and View Results Tree listener to see JMeter Variables values
- See JMeter Manual on Regular Expressions on how to create regex
相关问答
更多-
使用JMeter测试套接字(Using JMeter to test a socket)[2021-12-02]
尝试使用JMeter的Java请求采样器: http : //jmeter.apache.org/usermanual/component_reference.html#Java_Request Try using JMeter's Java Request Sampler: http://jmeter.apache.org/usermanual/component_reference.html#Java_Request -
如何使用JMeter API从JAVA Class获取Jmeter测试结果(how to get Jmeter test result from JAVA Class by using JMeter API)[2021-12-03]
在jmeter.run()节之前添加以下行: Summariser summer = null; String summariserName = JMeterUtils.getPropDefault("summariser.name", "summary");//$NON-NLS-1$ if (summariserName.length() > 0) { summer = new Summariser(summariserName); } String logFile = "/path/to/ou ... -
如果你把所有4步都放在事务控制器下,我能够弄明白。 然后在执行结束时,您将获得Aggregate Report下事务控制器的平均响应时间。 I am able to figure it out, if you put all 4 step under transaction Controller. Then at the end of execution you will get the Average response time for transaction Controller under Aggre ...
-
一种方法是在setup / tearDown线程组中: http://jmeter.apache.org/usermanual/component_reference.html#setUp_Thread_Group 确保选中“在关闭主线程后运行tearDown线程组”: http://jmeter.apache.org/usermanual/component_reference.html#Test_Plan A way to do it is within setup /tearDown thread g ...
-
你可以这样做: 在HTTP请求采样器之后添加如果控制器并将以下代码放入“条件”区域: `!${JMeterThread.last_sample_ok}` 将SMTP Sampler添加为If Controller的子级并配置您的电子邮件服务器详细信息,凭据,消息等 - 请参阅负载测试您的电子邮件服务器:如何使用JMeter发送和接收电子邮件文章以获取更多详细信息。 JMeterThread.last_sample_ok是一个预定义的JMeter变量 ,它保存前一个采样器执行的结果,如果前一个采样器成功则为 ...
-
您需要执行以下操作: 执行第一个请求到http://servername/request?rt=xml&c=12&s=skxil 添加正则表达式提取器后处理器以将数据提取到JMeter变量 使用JMeter变量作为下一个请求的参数 配置示例: 正则表达式提取器 参考名称 - 任何有意义的东西,即rh 正则表达式 - 在你的情况下它会像rh=(.+?)]] 模板 - $1$ 剩余字段可以留空。 第二个HTTP请求采样器 服务器名称或IP - http://servername 路径 - /mdtrack 参数 ...
-
从junit测试启动jmeter(Launch jmeter from junit test)[2022-06-24]
您可以使用JMeter Java API执行现有的JMeter测试,示例代码如下所示: import org.apache.jmeter.engine.StandardJMeterEngine; import org.apache.jmeter.reporters.ResultCollector; import org.apache.jmeter.reporters.Summariser; import org.apache.jmeter.save.SaveService; import org.apach ... -
右角会有一个指示器。 当执行正在进行时,在此位置显示绿色信号,当它完成时,绿色通知未显示.... There will be an indicator at the right corner. When the execution is going on there will be green signal shown at this location when it gets completed the green notificatuion is not shown....
-
通过使用BeanShell sampler运行本地代理服务器(BrowserMob Proxy项目)解决了该问题。 我将WebDriver采样器重新定位到此代理,使用浏览器执行所需的操作,然后以HAR格式存储捕获的数据并对其进行处理(从请求中提取所需的数据)。 然后只需将有价值的请求参数存储在变量(或属性)中,并在HTTP采样器中以常规方式使用它们来生成负载。 希望它能在未来帮助其他任何人。 Solved the issue by running local proxy server (BrowserMob ...
-
使用JMeter插件进行VSTS负载测试PathNotFoundException?(VSTS Load Testing With JMeter plugin PathNotFoundException?)[2023-10-23]
这可能是由JMeter版本引起的,因为VSTS负载测试仍然在测试代理上使用JMeter 2.13版本,有关详细信息,请参阅此链接: Apache JMeter测试 : 问:支持的JMeter版本是什么? 答:负载测试代理运行Apache JMeter 2.13版,这是目前可用的最新版本。 已经为此提交了用户语音,您可以在此处投票: 支持jMeter 3.0 。 This could be caused by the JMeter version since VSTS Load Testing is stil ...