Author: pmouawad
Date: Tue Nov 7 08:25:42 2017
New Revision: 1814464
URL: http://svn.apache.org/viewvc?rev=1814464=rev
Log:
Bug 61724 - Add __digest function to provide computing of Hashes (SHA-XXX, MDX)
Bugzilla Id: 61724
Added:
jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncode.java
(with props)
Modified:
jmeter/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java
jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/usermanual/functions.xml
Modified:
jmeter/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java?rev=1814464=1814463=1814464=diff
==
--- jmeter/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java Tue
Nov 7 08:25:42 2017
@@ -20,6 +20,7 @@ package org.apache.jmeter.functions;
import java.util.Collection;
+import org.apache.commons.lang3.StringUtils;
import org.apache.jmeter.engine.util.CompoundVariable;
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.Sampler;
@@ -140,4 +141,23 @@ public abstract class AbstractFunction i
);
}
}
+
+/**
+ * Utility method to store value in a variable
+ *
+ * @param value value of variable to update
+ * @param values array of {@link CompoundVariable} from which variable
name will be extracted
+ * @param index index of variable in values array
+ */
+ protected final void addVariableValue(String value, CompoundVariable[]
values, int index) {
+ if (values.length > index) {
+ String variableName = values[index].execute().trim();
+ if (StringUtils.isNotEmpty(variableName)) {
+ JMeterVariables vars = getVariables();
+ if (vars != null) {
+ vars.put(variableName, value);
+ }
+ }
+ }
+ }
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1814464=1814463=1814464=diff
==
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Tue
Nov 7 08:25:42 2017
@@ -95,6 +95,7 @@ aggregate_report_rate=Throughput
aggregate_report_stddev=Std. Dev.
aggregate_report_total_label=TOTAL
ajp_sampler_title=AJP/1.3 Sampler
+algorithm_string=Digest algorithm
als_message=Note\: The Access Log Parser is generic in design and allows you
to plugin
als_message2=your own parser. To do so, implement the LogParser, add the jar
to the
als_message3=/lib directory and enter the class in the sampler.
@@ -934,6 +935,7 @@ run_threadgroup_no_timers=Start no pause
running_test=Running test
runtime_controller_title=Runtime Controller
runtime_seconds=Runtime (seconds)
+salt_string=Salt to be used for hashing (optional)
sample_result_save_configuration=Sample Result Save Configuration
sample_scope=Apply to:
sample_scope_all=Main sample and sub-samples
@@ -1024,6 +1026,7 @@ server=Server Name or IP\:
servername=Servername \:
session_argument_name=Session Argument Name
setup_thread_group_title=setUp Thread Group
+sha_string=String to be hashed
should_save=You should save your test plan before running it. \nIf you are
using supporting data files (ie, for CSV Data Set or __StringFromFile), \nthen
it is particularly important to first save your test script. \nDo you want to
save your test plan first?
shutdown=Shutdown
simple_config_element=Simple Config Element
@@ -1224,6 +1227,7 @@ update=Update
update_per_iter=Update Once Per Iteration
upload=File Upload
upper_bound=Upper Bound
+upper_case=Upper case result, defaults to false (optional)
url=URL
url_config_get=GET
url_config_http=HTTP
Modified:
jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1814464=1814463=1814464=diff
==
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
Tue Nov 7 08:25:42 2017
@@ -90,6 +90,7 @@ aggregate_report_xx_pct1_line={0}% centi