Jmeter(四十) - 從入門到精通進階篇 - Jmeter配置檔案的刨根問底 - 中篇(詳解教程) Jmeter(四十) - 從入門到精通進階篇 - Jmeter配置檔案的刨根問底 - 中篇(詳解教程)
-------------------------------------------------------------------
轉載自:北京-巨集哥 https://www.cnblogs.com/du-hong/p/13667219.html
--------------------------------------------------------------------
Jmeter(四十) - 從入門到精通進階篇 - Jmeter配置檔案的刨根問底 - 中篇(詳解教程)
1.簡介
為什麼巨集哥要對Jmeter的配置檔案進行一下講解了,因為有的童鞋或者小夥伴在測試中遇到一些需要修改配置檔案的問題不是很清楚也不是很懂,就算修改了也是模模糊糊的。更有甚者覺得那是禁地神聖不可輕犯不敢觸碰不敢修改,害怕修改錯了Jmeter執行不了了。聽巨集哥的大膽修改大不了再重新安裝一個新的Jmeter,或者你有做備份的好習慣,在修改前備份好以後大膽修改,修改錯了直接使用備份檔案恢復過來就可以。
2.配置檔案
在%JMETER_HOME%\bin(or $JMETER_HOME/bin)目錄下搜尋框中輸入:properties 會發現存在多個配置檔案,如下圖所示:
巨集哥上一篇中對其中最重要的是jmeter.properties.是Jmeter核心配置項檔案,進行了講解和說明,下面對其它常用的一些配置檔案的設定進行總結與說明.按計劃今天巨集哥將要講解user.properties檔案。
3.user.properties
這個檔案不是很大,巨集哥將其內容全部進行翻譯了一下,我們下邊看看其中到底含有那些配置項。
3.1檔案說明
第1段——許可證說明
(1)原文
# Sample user.properties file # ## Licensed to the Apache Software Foundation (ASF) under one or more ## contributor license agreements. See the NOTICE file distributed with ## this work for additional information regarding copyright ownership. ## The ASF licenses this file to You under the Apache License, Version 2.0 ## (the "License"); you may not use this file except in compliance with ## the License. You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License.
(2)譯文
# 示例user.properties檔案 # ## Apache軟體基金會(ASF)下一個或多個許可 ## 貢獻者許可協議。請參閱 ## 此作品用於獲取關於版權所有權的附加資訊。 ## ASF根據Apache 2.0 版本許可證協議將此檔案授權給您。 ## (“許可證”);除非符合以下條件,否則不能使用此檔案 ## 許可證。您可以在 ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## 除非適用法律要求或書面同意,軟體 ## 根據在“AS IS”BASIS上分發的許可證基礎上釋出的, ## 無任何明示或暗示的保證或條件。 ## 有關管理許可權的特定語言,請參閱許可證 ## 《許可證》規定的限制。
3.2類路徑配置
(一)第2段——用於搜尋其他JMeter外掛類的路徑列表
(1)原文
#--------------------------------------------------------------------------- # Classpath configuration #--------------------------------------------------------------------------- # # List of paths (separated by ;) to search for additional JMeter plugin classes, # for example new GUI elements and samplers. # A path item can either be a jar file or a directory. # Any jar file in such a directory will be automatically included, # jar files in sub directories are ignored. # The given value is in addition to any jars found in the lib/ext directory. # Do not use this for utility or plugin dependency jars. #search_paths=/app1/lib;/app2/lib
(2)譯文
#--------------------------------------------------------------------------- # 類路徑配置 #--------------------------------------------------------------------------- # # 用於搜尋其他JMeter外掛類的路徑列表(由;分隔), # 例如,新的GUI元素和取樣器。 # 路徑項可以是jar檔案或目錄。 # 這樣的目錄中的任何jar檔案都將自動包含, # 忽略子目錄中的jar檔案。 # 給定值是在lib/ext目錄中找到的任何jar之外的值。 # 不要將此用於實用程式或外掛依賴項jar。 #search_paths=/app1/lib;/app2/lib
(二)第3段——搜尋實用程式和外掛依賴類的路徑列表
(1)原文
# List of paths that JMeter will search for utility and plugin dependency classes. # Use your platform path separator (java.io.File.pathSeparatorChar in Java) to separate multiple paths. # A path item can either be a jar file or a directory. # Any jar file in such a directory will be automatically included, # jar files in sub directories are ignored. # The given value is in addition to any jars found in the lib directory. # All entries will be added to the class path of the system class loader # and also to the path of the JMeter internal loader. # Paths with spaces may cause problems for the JVM #Example for windows (; separator) #user.classpath=../classes;../lib;../app1/jar1.jar;../app2/jar2.jar #Example for linux (:separator) #user.classpath=../classes:../lib:../app1/jar1.jar:../app2/jar2.jar
(2)譯文
# JMeter將搜尋實用程式和外掛依賴類的路徑列表。 # 使用您的平臺路徑分隔符(Java中的java. Io.Fiel.PosialStutoRealar)來分離多條路徑。 # 路徑項可以是jar檔案或目錄。 # 這樣的目錄中的任何jar檔案都將自動包含, # 忽略子目錄中的jar檔案。 # 給定的值是在lib目錄中找到的任何jar之外的值。 # 所有條目都將新增到系統類載入器的類路徑 # 以及JMeter內部載入程式的路徑。 # 帶有空間的路徑可能導致JVM的問題 #示例 Windows(分離器) #user.classpath=../classes;../lib;../app1/jar1.jar;../app2/jar2.jar #示例 linux (分離器) #user.classpath=../classes:../lib:../app1/jar1.jar:../app2/jar2.jar
(三)第4段——搜尋實用程式的路徑列表
(1)原文
# List of paths (separated by ;) that JMeter will search for utility # and plugin dependency classes. # A path item can either be a jar file or a directory. # Any jar file in such a directory will be automatically included, # jar files in sub directories are ignored. # The given value is in addition to any jars found in the lib directory # or given by the user.classpath property. # All entries will be added to the path of the JMeter internal loader only. # For plugin dependencies using plugin_dependency_paths should be preferred over # user.classpath. #plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar
(2)譯文
# JMeter將搜尋實用程式的路徑列表(由;分隔) # 以及外掛依賴類。 # 路徑項可以是jar檔案或目錄。 # 這樣的目錄中的任何jar檔案都將自動包含, # 忽略子目錄中的jar檔案。 # 給定值是在lib目錄中找到的任何jar之外的值 # 或者由user.classpath屬性給出。 # 所有條目將僅新增到JMeter內部載入程式的路徑。 # 對於外掛依賴關係,應該優先使用 plugin_dependency_paths # user.classpath. #plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar
3.3報告配置
(一)第5段——標題
(1)原文
#--------------------------------------------------------------------------- # Reporting configuration #---------------------------------------------------------------------------
(2)譯文
#--------------------------------------------------------------------------- # 報告配置 #---------------------------------------------------------------------------
(二)第6段——更改報表標題
(1)原文
# Configure this property to change the report title #jmeter.reportgenerator.report_title=Apache JMeter Dashboard
(2)譯文
# 配置此屬性以更改報表標題 #jmeter.reportgenerator.report_title=Apache JMeter Dashboard
(三)第7段——根據日期範圍生成報告
(1)原文
# Used to generate a report based on a date range if needed # Default date format (from SimpleDateFormat Java API and Locale.ENGLISH) #jmeter.reportgenerator.date_format=yyyyMMddHHmmss # Date range start date using date_format property #jmeter.reportgenerator.start_date= # Date range end date using date_format property #jmeter.reportgenerator.end_date=
(2)譯文
# 如果需要,可用於根據日期範圍生成報告 # 預設日期格式 (來自 Java API 和 Locale.ENGLISH 的日期格式) #jmeter.reportgenerator.date_format=yyyyMMddHHmmss # 日期範圍開始日期使用 date_format 屬性 #jmeter.reportgenerator.start_date= # 日期範圍結束日期使用 date_format 屬性 #jmeter.reportgenerator.end_date=
(四)第8段——更改隨時間變化的圖的粒度
(1)原文
# Change this parameter if you want to change the granularity of over time graphs. #jmeter.reportgenerator.overall_granularity=60000
(2)譯文
# 如果希望更改隨時間變化的圖的粒度,請更改此引數。 #jmeter.reportgenerator.overall_granularity=60000
(五)第9段——更改響應時間分佈的粒度
(1)原文
# Change this parameter if you want to change the granularity of Response time distribution # Set to 100 ms by default #jmeter.reportgenerator.graph.responseTimeDistribution.property.set_granularity=100
(2)譯文
# 如果希望更改響應時間分佈的粒度,請更改此引數 # 預設設定為100ms #jmeter.reportgenerator.graph.responseTimeDistribution.property.set_granularity=100
(六)第10段——指示為圖形和統計生成保留哪些樣本
(1)原文
# Change this parameter if you want to keep only some samples. # Regular Expression which Indicates which samples to keep for graphs and statistics generation. # Empty value means no filtering #jmeter.reportgenerator.sample_filter=
(2)譯文
# 如果僅希望保留一些示例,請更改此引數。 # 正則表示式,它指示為圖形和統計生成保留哪些樣本。 # 空值意味著沒有過濾 #jmeter.reportgenerator.sample_filter=
(七)第11段——修改APDEX滿意度閾值
(1)原文
# Change this parameter if you want to override the APDEX satisfaction threshold. #jmeter.reportgenerator.apdex_satisfied_threshold=500
(2)譯文
# 如果要修改APDEX滿意度閾值,請更改此引數。 #jmeter.reportgenerator.apdex_satisfied_threshold=500
(八)第12段——修改APDEX容忍閾值
(1)原文
# Change this parameter if you want to override the APDEX tolerance threshold. #jmeter.reportgenerator.apdex_tolerated_threshold=1500
(2)譯文
# 如果要修改APDEX容忍閾值,請更改此引數。 #jmeter.reportgenerator.apdex_tolerated_threshold=1500
(九)第13段—— 指示篩選的圖形系列(正則表示式)
(1)原文
# Indicates which graph series are filtered (regular expression) # In the below example we filter on Search and Order samples # Note that the end of the pattern should always include (-success|-failure)?$ # TransactionsPerSecondGraphConsumer suffixes transactions with "-success" or "-failure" depending # on the result #jmeter.reportgenerator.exporter.html.series_filter=^(Search|Order)(-success|-failure)?$
(2)譯文
# 指示篩選的圖形系列(正則表示式) # 在下面的示例中,在下面的示例中,我們對搜尋和訂單樣本進行過濾(您只能修改搜尋|訂單欄位值,保留其餘部分,以便在您不想要所有內容時僅保留報表中所需的事務)。 # 注意,模式的結尾應該始終包括 (-success|-failure)?$ # Transactions每秒字尾使用“-success”或“-failure”的事務,取決於 # 結果的 #jmeter.reportgenerator.exporter.html.series_filter=^(搜尋|訂單)(-success|-failure)?$
(十)第14段——指示是否僅在支援該控制器的圖形上顯示控制器示例
(1)原文
# Indicates whether only controller samples are displayed on graphs that support it. #jmeter.reportgenerator.exporter.html.show_controllers_only=false
(2)譯文
# 指示是否僅在支援該控制器的圖形上顯示控制器示例。 #jmeter.reportgenerator.exporter.html.show_controllers_only=false
(十一)第15段——選擇預設情況下將匯出哪些事務
(1)原文
# This property is used by menu item "Export transactions for report" # It is used to select which transactions by default will be exported #jmeter.reportgenerator.exported_transactions_pattern=[a-zA-Z0-9_\\-{}\\$\\.]*[-_][0-9]*
(2)譯文
# 此屬性用於選單項“匯出事務報告” # 它用於選擇預設情況下將匯出哪些事務 #jmeter.reportgenerator.exported_transactions_pattern=[a-zA-Z0-9_\\-{}\\$\\.]*[-_][0-9]*
(十二)第16段——自定義圖形定義
(1)原文
## Custom graph definition #jmeter.reportgenerator.graph.custom_mm_hit.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer #jmeter.reportgenerator.graph.custom_mm_hit.title=Graph Title #jmeter.reportgenerator.graph.custom_mm_hit.property.set_Y_Axis=Response Time (ms) #jmeter.reportgenerator.graph.custom_mm_hit.property.set_X_Axis=Over Time #jmeter.reportgenerator.graph.custom_mm_hit.property.set_granularity=${jmeter.reportgenerator.overall_granularity} #jmeter.reportgenerator.graph.custom_mm_hit.property.setSampleVariableName=VarName #jmeter.reportgenerator.graph.custom_mm_hit.property.setContentMessage=Message for graph point label
(2)譯文
## 自定義圖形定義 #jmeter.reportgenerator.graph.custom_mm_hit.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer #jmeter.reportgenerator.graph.custom_mm_hit.title=Graph Title #jmeter.reportgenerator.graph.custom_mm_hit.property.set_Y_Axis=Response Time (ms) #jmeter.reportgenerator.graph.custom_mm_hit.property.set_X_Axis=Over Time #jmeter.reportgenerator.graph.custom_mm_hit.property.set_granularity=${jmeter.reportgenerator.overall_granularity} #jmeter.reportgenerator.graph.custom_mm_hit.property.setSampleVariableName=VarName #jmeter.reportgenerator.graph.custom_mm_hit.property.setContentMessage=Message for graph point label
3.4分散式測試配置
第17段——分散式測試配置
(1)原文
######################################################################## ################## DISTRIBUTED TESTING CONFIGURATION ################## ######################################################################## # Type of keystore : JKS # #server.rmi.ssl.keystore.type=JKS # # Keystore file that contains private key # #server.rmi.ssl.keystore.file=rmi_keystore.jks # # Password of Keystore # #server.rmi.ssl.keystore.password=changeit # # Key alias # #server.rmi.ssl.keystore.alias=rmi # # Type of truststore : JKS # #server.rmi.ssl.truststore.type=JKS # # Keystore file that contains certificate # #server.rmi.ssl.truststore.file=rmi_keystore.jks # # Password of Trust store # #server.rmi.ssl.truststore.password=changeit # # Set this if you don't want to use SSL for RMI # #server.rmi.ssl.disable=false
(2)譯文
######################################################################## ################## 分散式測試配置 ################## ######################################################################## # 金鑰庫型別:JKS # #server.rmi.ssl.keystore.type=JKS # # 包含私鑰的金鑰檔案 # #server.rmi.ssl.keystore.file=rmi_keystore.jks # # 鍵盤密碼 # #server.rmi.ssl.keystore.password=changeit # # 金鑰別名 # #server.rmi.ssl.keystore.alias=rmi # # 信任庫型別:JKS # #server.rmi.ssl.truststore.type=JKS # # 包含證書的金鑰檔案 # #server.rmi.ssl.truststore.file=rmi_keystore.jks # # 信任儲存區密碼 # #server.rmi.ssl.truststore.password=changeit # # 如果不想為RMI使用SSL,請設定此設定 # #server.rmi.ssl.disable=false
4.小結
上一篇中我們講解修改jmeter.properties檔案官方建議:將需要修改的屬性值,複製貼上到同目錄下的 user.properties,為什麼本來在jmeter.properties修改的屬性值,複製到user.properties檔案中仍然可以起作用了,原因如下圖所示:
從上圖中我們可以看出,Jmeter啟動讀取jmeter.properties檔案的時候也會自動載入user.properties檔案。所以在jmeter.properties修改的屬性值,複製到user.properties檔案中仍然可以起作用。
好了,今天就分析和講解到這裡吧!謝謝您耐心的閱讀!!!
1.簡介
為什麼巨集哥要對Jmeter的配置檔案進行一下講解了,因為有的童鞋或者小夥伴在測試中遇到一些需要修改配置檔案的問題不是很清楚也不是很懂,就算修改了也是模模糊糊的。更有甚者覺得那是禁地神聖不可輕犯不敢觸碰不敢修改,害怕修改錯了Jmeter執行不了了。聽巨集哥的大膽修改大不了再重新安裝一個新的Jmeter,或者你有做備份的好習慣,在修改前備份好以後大膽修改,修改錯了直接使用備份檔案恢復過來就可以。
2.配置檔案
在%JMETER_HOME%\bin(or $JMETER_HOME/bin)目錄下搜尋框中輸入:properties 會發現存在多個配置檔案,如下圖所示:
巨集哥上一篇中對其中最重要的是jmeter.properties.是Jmeter核心配置項檔案,進行了講解和說明,下面對其它常用的一些配置檔案的設定進行總結與說明.按計劃今天巨集哥將要講解user.properties檔案。
3.user.properties
這個檔案不是很大,巨集哥將其內容全部進行翻譯了一下,我們下邊看看其中到底含有那些配置項。
3.1檔案說明
第1段——許可證說明
(1)原文
# Sample user.properties file # ## Licensed to the Apache Software Foundation (ASF) under one or more ## contributor license agreements. See the NOTICE file distributed with ## this work for additional information regarding copyright ownership. ## The ASF licenses this file to You under the Apache License, Version 2.0 ## (the "License"); you may not use this file except in compliance with ## the License. You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License.
(2)譯文
# 示例user.properties檔案 # ## Apache軟體基金會(ASF)下一個或多個許可 ## 貢獻者許可協議。請參閱 ## 此作品用於獲取關於版權所有權的附加資訊。 ## ASF根據Apache 2.0 版本許可證協議將此檔案授權給您。 ## (“許可證”);除非符合以下條件,否則不能使用此檔案 ## 許可證。您可以在 ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## 除非適用法律要求或書面同意,軟體 ## 根據在“AS IS”BASIS上分發的許可證基礎上釋出的, ## 無任何明示或暗示的保證或條件。 ## 有關管理許可權的特定語言,請參閱許可證 ## 《許可證》規定的限制。
3.2類路徑配置
(一)第2段——用於搜尋其他JMeter外掛類的路徑列表
(1)原文
#--------------------------------------------------------------------------- # Classpath configuration #--------------------------------------------------------------------------- # # List of paths (separated by ;) to search for additional JMeter plugin classes, # for example new GUI elements and samplers. # A path item can either be a jar file or a directory. # Any jar file in such a directory will be automatically included, # jar files in sub directories are ignored. # The given value is in addition to any jars found in the lib/ext directory. # Do not use this for utility or plugin dependency jars. #search_paths=/app1/lib;/app2/lib
(2)譯文
#--------------------------------------------------------------------------- # 類路徑配置 #--------------------------------------------------------------------------- # # 用於搜尋其他JMeter外掛類的路徑列表(由;分隔), # 例如,新的GUI元素和取樣器。 # 路徑項可以是jar檔案或目錄。 # 這樣的目錄中的任何jar檔案都將自動包含, # 忽略子目錄中的jar檔案。 # 給定值是在lib/ext目錄中找到的任何jar之外的值。 # 不要將此用於實用程式或外掛依賴項jar。 #search_paths=/app1/lib;/app2/lib
(二)第3段——搜尋實用程式和外掛依賴類的路徑列表
(1)原文
# List of paths that JMeter will search for utility and plugin dependency classes. # Use your platform path separator (java.io.File.pathSeparatorChar in Java) to separate multiple paths. # A path item can either be a jar file or a directory. # Any jar file in such a directory will be automatically included, # jar files in sub directories are ignored. # The given value is in addition to any jars found in the lib directory. # All entries will be added to the class path of the system class loader # and also to the path of the JMeter internal loader. # Paths with spaces may cause problems for the JVM #Example for windows (; separator) #user.classpath=../classes;../lib;../app1/jar1.jar;../app2/jar2.jar #Example for linux (:separator) #user.classpath=../classes:../lib:../app1/jar1.jar:../app2/jar2.jar
(2)譯文
# JMeter將搜尋實用程式和外掛依賴類的路徑列表。 # 使用您的平臺路徑分隔符(Java中的java. Io.Fiel.PosialStutoRealar)來分離多條路徑。 # 路徑項可以是jar檔案或目錄。 # 這樣的目錄中的任何jar檔案都將自動包含, # 忽略子目錄中的jar檔案。 # 給定的值是在lib目錄中找到的任何jar之外的值。 # 所有條目都將新增到系統類載入器的類路徑 # 以及JMeter內部載入程式的路徑。 # 帶有空間的路徑可能導致JVM的問題 #示例 Windows(分離器) #user.classpath=../classes;../lib;../app1/jar1.jar;../app2/jar2.jar #示例 linux (分離器) #user.classpath=../classes:../lib:../app1/jar1.jar:../app2/jar2.jar
(三)第4段——搜尋實用程式的路徑列表
(1)原文
# List of paths (separated by ;) that JMeter will search for utility # and plugin dependency classes. # A path item can either be a jar file or a directory. # Any jar file in such a directory will be automatically included, # jar files in sub directories are ignored. # The given value is in addition to any jars found in the lib directory # or given by the user.classpath property. # All entries will be added to the path of the JMeter internal loader only. # For plugin dependencies using plugin_dependency_paths should be preferred over # user.classpath. #plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar
(2)譯文
# JMeter將搜尋實用程式的路徑列表(由;分隔) # 以及外掛依賴類。 # 路徑項可以是jar檔案或目錄。 # 這樣的目錄中的任何jar檔案都將自動包含, # 忽略子目錄中的jar檔案。 # 給定值是在lib目錄中找到的任何jar之外的值 # 或者由user.classpath屬性給出。 # 所有條目將僅新增到JMeter內部載入程式的路徑。 # 對於外掛依賴關係,應該優先使用 plugin_dependency_paths # user.classpath. #plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar
3.3報告配置
(一)第5段——標題
(1)原文
#--------------------------------------------------------------------------- # Reporting configuration #---------------------------------------------------------------------------
(2)譯文
#--------------------------------------------------------------------------- # 報告配置 #---------------------------------------------------------------------------
(二)第6段——更改報表標題
(1)原文
# Configure this property to change the report title #jmeter.reportgenerator.report_title=Apache JMeter Dashboard
(2)譯文
# 配置此屬性以更改報表標題 #jmeter.reportgenerator.report_title=Apache JMeter Dashboard
(三)第7段——根據日期範圍生成報告
(1)原文
# Used to generate a report based on a date range if needed # Default date format (from SimpleDateFormat Java API and Locale.ENGLISH) #jmeter.reportgenerator.date_format=yyyyMMddHHmmss # Date range start date using date_format property #jmeter.reportgenerator.start_date= # Date range end date using date_format property #jmeter.reportgenerator.end_date=
(2)譯文
# 如果需要,可用於根據日期範圍生成報告 # 預設日期格式 (來自 Java API 和 Locale.ENGLISH 的日期格式) #jmeter.reportgenerator.date_format=yyyyMMddHHmmss # 日期範圍開始日期使用 date_format 屬性 #jmeter.reportgenerator.start_date= # 日期範圍結束日期使用 date_format 屬性 #jmeter.reportgenerator.end_date=
(四)第8段——更改隨時間變化的圖的粒度
(1)原文
# Change this parameter if you want to change the granularity of over time graphs. #jmeter.reportgenerator.overall_granularity=60000
(2)譯文
# 如果希望更改隨時間變化的圖的粒度,請更改此引數。 #jmeter.reportgenerator.overall_granularity=60000
(五)第9段——更改響應時間分佈的粒度
(1)原文
# Change this parameter if you want to change the granularity of Response time distribution # Set to 100 ms by default #jmeter.reportgenerator.graph.responseTimeDistribution.property.set_granularity=100
(2)譯文
# 如果希望更改響應時間分佈的粒度,請更改此引數 # 預設設定為100ms #jmeter.reportgenerator.graph.responseTimeDistribution.property.set_granularity=100
(六)第10段——指示為圖形和統計生成保留哪些樣本
(1)原文
# Change this parameter if you want to keep only some samples. # Regular Expression which Indicates which samples to keep for graphs and statistics generation. # Empty value means no filtering #jmeter.reportgenerator.sample_filter=
(2)譯文
# 如果僅希望保留一些示例,請更改此引數。 # 正則表示式,它指示為圖形和統計生成保留哪些樣本。 # 空值意味著沒有過濾 #jmeter.reportgenerator.sample_filter=
(七)第11段——修改APDEX滿意度閾值
(1)原文
# Change this parameter if you want to override the APDEX satisfaction threshold. #jmeter.reportgenerator.apdex_satisfied_threshold=500
(2)譯文
# 如果要修改APDEX滿意度閾值,請更改此引數。 #jmeter.reportgenerator.apdex_satisfied_threshold=500
(八)第12段——修改APDEX容忍閾值
(1)原文
# Change this parameter if you want to override the APDEX tolerance threshold. #jmeter.reportgenerator.apdex_tolerated_threshold=1500
(2)譯文
# 如果要修改APDEX容忍閾值,請更改此引數。 #jmeter.reportgenerator.apdex_tolerated_threshold=1500
(九)第13段—— 指示篩選的圖形系列(正則表示式)
(1)原文
# Indicates which graph series are filtered (regular expression) # In the below example we filter on Search and Order samples # Note that the end of the pattern should always include (-success|-failure)?$ # TransactionsPerSecondGraphConsumer suffixes transactions with "-success" or "-failure" depending # on the result #jmeter.reportgenerator.exporter.html.series_filter=^(Search|Order)(-success|-failure)?$
(2)譯文
# 指示篩選的圖形系列(正則表示式) # 在下面的示例中,在下面的示例中,我們對搜尋和訂單樣本進行過濾(您只能修改搜尋|訂單欄位值,保留其餘部分,以便在您不想要所有內容時僅保留報表中所需的事務)。 # 注意,模式的結尾應該始終包括 (-success|-failure)?$ # Transactions每秒字尾使用“-success”或“-failure”的事務,取決於 # 結果的 #jmeter.reportgenerator.exporter.html.series_filter=^(搜尋|訂單)(-success|-failure)?$
(十)第14段——指示是否僅在支援該控制器的圖形上顯示控制器示例
(1)原文
# Indicates whether only controller samples are displayed on graphs that support it. #jmeter.reportgenerator.exporter.html.show_controllers_only=false
(2)譯文
# 指示是否僅在支援該控制器的圖形上顯示控制器示例。 #jmeter.reportgenerator.exporter.html.show_controllers_only=false
(十一)第15段——選擇預設情況下將匯出哪些事務
(1)原文
# This property is used by menu item "Export transactions for report" # It is used to select which transactions by default will be exported #jmeter.reportgenerator.exported_transactions_pattern=[a-zA-Z0-9_\\-{}\\$\\.]*[-_][0-9]*
(2)譯文
# 此屬性用於選單項“匯出事務報告” # 它用於選擇預設情況下將匯出哪些事務 #jmeter.reportgenerator.exported_transactions_pattern=[a-zA-Z0-9_\\-{}\\$\\.]*[-_][0-9]*
(十二)第16段——自定義圖形定義
(1)原文
## Custom graph definition #jmeter.reportgenerator.graph.custom_mm_hit.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer #jmeter.reportgenerator.graph.custom_mm_hit.title=Graph Title #jmeter.reportgenerator.graph.custom_mm_hit.property.set_Y_Axis=Response Time (ms) #jmeter.reportgenerator.graph.custom_mm_hit.property.set_X_Axis=Over Time #jmeter.reportgenerator.graph.custom_mm_hit.property.set_granularity=${jmeter.reportgenerator.overall_granularity} #jmeter.reportgenerator.graph.custom_mm_hit.property.setSampleVariableName=VarName #jmeter.reportgenerator.graph.custom_mm_hit.property.setContentMessage=Message for graph point label
(2)譯文
## 自定義圖形定義 #jmeter.reportgenerator.graph.custom_mm_hit.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer #jmeter.reportgenerator.graph.custom_mm_hit.title=Graph Title #jmeter.reportgenerator.graph.custom_mm_hit.property.set_Y_Axis=Response Time (ms) #jmeter.reportgenerator.graph.custom_mm_hit.property.set_X_Axis=Over Time #jmeter.reportgenerator.graph.custom_mm_hit.property.set_granularity=${jmeter.reportgenerator.overall_granularity} #jmeter.reportgenerator.graph.custom_mm_hit.property.setSampleVariableName=VarName #jmeter.reportgenerator.graph.custom_mm_hit.property.setContentMessage=Message for graph point label
3.4分散式測試配置
第17段——分散式測試配置
(1)原文
######################################################################## ################## DISTRIBUTED TESTING CONFIGURATION ################## ######################################################################## # Type of keystore : JKS # #server.rmi.ssl.keystore.type=JKS # # Keystore file that contains private key # #server.rmi.ssl.keystore.file=rmi_keystore.jks # # Password of Keystore # #server.rmi.ssl.keystore.password=changeit # # Key alias # #server.rmi.ssl.keystore.alias=rmi # # Type of truststore : JKS # #server.rmi.ssl.truststore.type=JKS # # Keystore file that contains certificate # #server.rmi.ssl.truststore.file=rmi_keystore.jks # # Password of Trust store # #server.rmi.ssl.truststore.password=changeit # # Set this if you don't want to use SSL for RMI # #server.rmi.ssl.disable=false
(2)譯文
######################################################################## ################## 分散式測試配置 ################## ######################################################################## # 金鑰庫型別:JKS # #server.rmi.ssl.keystore.type=JKS # # 包含私鑰的金鑰檔案 # #server.rmi.ssl.keystore.file=rmi_keystore.jks # # 鍵盤密碼 # #server.rmi.ssl.keystore.password=changeit # # 金鑰別名 # #server.rmi.ssl.keystore.alias=rmi # # 信任庫型別:JKS # #server.rmi.ssl.truststore.type=JKS # # 包含證書的金鑰檔案 # #server.rmi.ssl.truststore.file=rmi_keystore.jks # # 信任儲存區密碼 # #server.rmi.ssl.truststore.password=changeit # # 如果不想為RMI使用SSL,請設定此設定 # #server.rmi.ssl.disable=false
4.小結
上一篇中我們講解修改jmeter.properties檔案官方建議:將需要修改的屬性值,複製貼上到同目錄下的 user.properties,為什麼本來在jmeter.properties修改的屬性值,複製到user.properties檔案中仍然可以起作用了,原因如下圖所示:
從上圖中我們可以看出,Jmeter啟動讀取jmeter.properties檔案的時候也會自動載入user.properties檔案。所以在jmeter.properties修改的屬性值,複製到user.properties檔案中仍然可以起作用。
好了,今天就分析和講解到這裡吧!謝謝您耐心的閱讀!!!