gpt4 book ai didi

java - 如何在jmeter中创建用户定义函数

转载 作者:太空宇宙 更新时间:2023-11-04 06:20:46 24 4
gpt4 key购买 nike

我想在jmeter中创建一个函数,需要使用函数帮助器对话框来调用这个函数,当我用谷歌搜索这个问题时,我找到了一个链接

http://www.javacodegeeks.com/2013/06/jmeter-custom-function-implementation.html

但是创建的函数仍然没有出现在对话框中。

有人会帮助我解决这个问题吗?

提前致谢......

我的 Jmeter 日志是:

2014/12/18 10:48:00 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US 
2014/12/18 10:48:00 INFO - jmeter.JMeter: Loading user properties from: E:\apache-jmeter-2.12\apache-jmeter-2.12\bin\user.properties
2014/12/18 10:48:01 INFO - jmeter.JMeter: Loading system properties from: E:\apache-jmeter-2.12\apache-jmeter-2.12\bin\system.properties
2014/12/18 10:48:01 INFO - jmeter.JMeter: Copyright (c) 1998-2014 The Apache Software Foundation
2014/12/18 10:48:01 INFO - jmeter.JMeter: Version 2.12 r1636949
2014/12/18 10:48:01 INFO - jmeter.JMeter: java.version=1.7.0_51
2014/12/18 10:48:01 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) Client VM
2014/12/18 10:48:01 INFO - jmeter.JMeter: os.name=Windows XP
2014/12/18 10:48:01 INFO - jmeter.JMeter: os.arch=x86
2014/12/18 10:48:01 INFO - jmeter.JMeter: os.version=5.1
2014/12/18 10:48:01 INFO - jmeter.JMeter: file.encoding=Cp1252
2014/12/18 10:48:01 INFO - jmeter.JMeter: Default Locale=English (United States)
2014/12/18 10:48:01 INFO - jmeter.JMeter: JMeter Locale=English (United States)
2014/12/18 10:48:01 INFO - jmeter.JMeter: JMeterHome=E:\apache-jmeter-2.12\apache-jmeter-2.12
2014/12/18 10:48:01 INFO - jmeter.JMeter: user.dir =E:\apache-jmeter-2.12\apache-jmeter-2.12\bin
2014/12/18 10:48:01 INFO - jmeter.JMeter: PWD =E:\apache-jmeter-2.12\apache-jmeter-2.12\bin
2014/12/18 10:48:01 INFO - jmeter.JMeter: IP: 10.206.0.106 Name: himanshuj2 FullName: himanshuj2.newvisionsoftware.com
2014/12/18 10:48:01 INFO - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties
2014/12/18 10:48:03 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2014/12/18 10:48:03 INFO - jmeter.gui.action.LookAndFeelCommand: Using look and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform]
2014/12/18 10:48:04 INFO - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22
2014/12/18 10:48:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default
2014/12/18 10:48:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is
2014/12/18 10:48:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is
2014/12/18 10:48:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is
2014/12/18 10:48:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is
2014/12/18 10:48:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2014/12/18 10:48:05 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui
2014/12/18 10:48:05 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
2014/12/18 10:48:06 INFO - jorphan.exec.KeyToolUtils: keytool found at 'keytool'
2014/12/18 10:48:06 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file E:\apache-jmeter-2.12\apache-jmeter-2.12\bin\proxyserver.jks
2014/12/18 10:48:08 INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times
2014/12/18 10:48:08 INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2014/12/18 10:48:08 INFO - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true
2014/12/18 10:48:08 INFO - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000

最佳答案

您必须确保您的函数位于名称中包含以下内容的包中:

  • .函数。并且不包含.gui。

这是根据 jmeter.properties 中的此属性:

  • classfinder.functions.contain=.functions。

  • classfinder.functions.notContain=.gui。

关于java - 如何在jmeter中创建用户定义函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27444565/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com