首页 \ 问答 \ 我应该在我的自定义代码之前或在我覆盖方法之后调用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

最满意答案

您需要执行以下操作:

  1. 执行第一个请求到http://servername/request?rt=xml&c=12&s=skxil
  2. 添加正则表达式提取器后处理器以将数据提取到JMeter变量
  3. 使用JMeter变量作为下一个请求的参数

配置示例:

正则表达式提取器

  • 参考名称 - 任何有意义的东西,即rh
  • 正则表达式 - 在你的情况下它会像rh=(.+?)]]
  • 模板 - $1$

剩余字段可以留空。

第二个HTTP请求采样器

  • 服务器名称或IP - http://servername
  • 路径 - /mdtrack
  • 参数名称 - rh
  • 参数值 - ${rh}

最后2个参数应转到“使用请求发送参数”部分

一些有用的链接:

  1. 您可以使用Jakarta ORO Demonstration applet测试您的正则表达式
  2. 您可以使用Debug SamplerView Results Tree侦听 器的组合来查看JMeter Variables值
  3. 有关如何创建正则表达式的请参阅正则表达式的JMeter手册

You need to do the following:

  1. Execute first request to http://servername/request?rt=xml&c=12&s=skxil
  2. Add Regular Expression Extractor Post Processor to extract data to JMeter Variable
  3. 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:

  1. You can test your Regular Expressions using Jakarta ORO Demonstration applet
  2. You can use combination of Debug Sampler and View Results Tree listener to see JMeter Variables values
  3. See JMeter Manual on Regular Expressions on how to create regex

相关问答

更多
  • 尝试使用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.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 参数 ...
  • 您可以使用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负载测试仍然在测试代理上使用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 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。