diff --git a/bin/examples/PerformanceTestPlanMemoryThread.jmx b/bin/examples/PerformanceTestPlanMemoryThread.jmx
index ad0fb9d51ae..8d6ba62c1ba 100644
--- a/bin/examples/PerformanceTestPlanMemoryThread.jmx
+++ b/bin/examples/PerformanceTestPlanMemoryThread.jmx
@@ -155,7 +155,7 @@
-
+
200
Assertion.response_code
@@ -164,7 +164,7 @@
-
+
abcdefghijklmno
Assertion.response_data
@@ -268,7 +268,7 @@
-
+
200
Assertion.response_code
@@ -277,7 +277,7 @@
-
+
abcdefghijklmno
Assertion.response_data
diff --git a/bin/templates/build-adv-web-test-plan.jmx b/bin/templates/build-adv-web-test-plan.jmx
index 5c4ba2654e1..57e813e1bb2 100644
--- a/bin/templates/build-adv-web-test-plan.jmx
+++ b/bin/templates/build-adv-web-test-plan.jmx
@@ -143,7 +143,7 @@
-
+
<title>Apache JMeter - Apache JMeter™</title>
We check page contains some text
@@ -191,7 +191,7 @@
-
+
<title>Apache JMeter - Changes</title>
We check page contains some text
@@ -250,7 +250,7 @@
-
+
This is <b>ASF Bugzilla</b>: the Apache Software Foundation bug system
We check page contains some text
diff --git a/bin/templates/build-ldap-test-plan.jmx b/bin/templates/build-ldap-test-plan.jmx
index 5ef9dcf91e0..af7e646ff0b 100644
--- a/bin/templates/build-ldap-test-plan.jmx
+++ b/bin/templates/build-ldap-test-plan.jmx
@@ -95,7 +95,7 @@
-
+
successful
Assertion.response_data
diff --git a/bin/templates/build-web-test-plan.jmx b/bin/templates/build-web-test-plan.jmx
index 6884d1d0da4..95dfd3e3e5b 100644
--- a/bin/templates/build-web-test-plan.jmx
+++ b/bin/templates/build-web-test-plan.jmx
@@ -94,7 +94,7 @@ Connect to 5s
-
+
<h1>Example Domain</h1>
Assertion.response_data
@@ -137,7 +137,7 @@ Connect to 5s
-
+
404
The assertion is specia:
diff --git a/bin/templates/build-webservice-test-plan.jmx b/bin/templates/build-webservice-test-plan.jmx
index b78dc077479..b2472583f25 100644
--- a/bin/templates/build-webservice-test-plan.jmx
+++ b/bin/templates/build-webservice-test-plan.jmx
@@ -98,7 +98,7 @@
-
+
</GetCityForecastByZIPResult>
Verify content in response
diff --git a/bin/testfiles/AssertionTestPlan.jmx b/bin/testfiles/AssertionTestPlan.jmx
index 1fe871fa8b0..54990de8cfd 100644
--- a/bin/testfiles/AssertionTestPlan.jmx
+++ b/bin/testfiles/AssertionTestPlan.jmx
@@ -44,7 +44,7 @@
-
+
</html>
Assertion.response_data
diff --git a/bin/testfiles/FTP_TESTS.jmx b/bin/testfiles/FTP_TESTS.jmx
index b8f6028bd3b..135fa46a8aa 100644
--- a/bin/testfiles/FTP_TESTS.jmx
+++ b/bin/testfiles/FTP_TESTS.jmx
@@ -158,7 +158,7 @@ props.put("FTP_SERVER", server);
-
+
Apache JMeter Property file
Assertion.response_data
@@ -181,7 +181,7 @@ props.put("FTP_SERVER", server);
-
+
Apache JMeter Property file
Assertion.response_data
@@ -217,7 +217,7 @@ props.put("FTP_SERVER", server);
-
+
Apache JMeter Property file
Assertion.response_data
diff --git a/bin/testfiles/GenTest210.expected.jmx b/bin/testfiles/GenTest210.expected.jmx
index e19dd7be0af..0d6f2126b5b 100644
--- a/bin/testfiles/GenTest210.expected.jmx
+++ b/bin/testfiles/GenTest210.expected.jmx
@@ -892,7 +892,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest210.jmx b/bin/testfiles/GenTest210.jmx
index 315898124eb..743052b5a37 100644
--- a/bin/testfiles/GenTest210.jmx
+++ b/bin/testfiles/GenTest210.jmx
@@ -892,7 +892,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest22.jmx b/bin/testfiles/GenTest22.jmx
index ef612bd12f0..2c0b4e55336 100644
--- a/bin/testfiles/GenTest22.jmx
+++ b/bin/testfiles/GenTest22.jmx
@@ -656,7 +656,7 @@
false
2
-
+
Assertion.response_data
diff --git a/bin/testfiles/GenTest231.jmx b/bin/testfiles/GenTest231.jmx
index e082fae158c..34be68fb98f 100644
--- a/bin/testfiles/GenTest231.jmx
+++ b/bin/testfiles/GenTest231.jmx
@@ -698,7 +698,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest24.jmx b/bin/testfiles/GenTest24.jmx
index 6438c20c56d..86968c69a21 100644
--- a/bin/testfiles/GenTest24.jmx
+++ b/bin/testfiles/GenTest24.jmx
@@ -833,7 +833,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest25.expected.jmx b/bin/testfiles/GenTest25.expected.jmx
index 19c50aa1989..4ce5e425955 100644
--- a/bin/testfiles/GenTest25.expected.jmx
+++ b/bin/testfiles/GenTest25.expected.jmx
@@ -840,7 +840,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest25.jmx b/bin/testfiles/GenTest25.jmx
index e20950868cd..fb064097131 100644
--- a/bin/testfiles/GenTest25.jmx
+++ b/bin/testfiles/GenTest25.jmx
@@ -840,7 +840,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest251.expected.jmx b/bin/testfiles/GenTest251.expected.jmx
index 63062f12368..5d5240a36c6 100644
--- a/bin/testfiles/GenTest251.expected.jmx
+++ b/bin/testfiles/GenTest251.expected.jmx
@@ -838,7 +838,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest251.jmx b/bin/testfiles/GenTest251.jmx
index f6d1bd50f94..b20abc5319b 100644
--- a/bin/testfiles/GenTest251.jmx
+++ b/bin/testfiles/GenTest251.jmx
@@ -838,7 +838,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest26.expected.jmx b/bin/testfiles/GenTest26.expected.jmx
index 766d398d0e2..62fa279a659 100644
--- a/bin/testfiles/GenTest26.expected.jmx
+++ b/bin/testfiles/GenTest26.expected.jmx
@@ -875,7 +875,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest26.jmx b/bin/testfiles/GenTest26.jmx
index 215d8b668c3..6c0537c9b22 100644
--- a/bin/testfiles/GenTest26.jmx
+++ b/bin/testfiles/GenTest26.jmx
@@ -875,7 +875,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest27.expected.jmx b/bin/testfiles/GenTest27.expected.jmx
index ccce46a57b8..e3be19d08e5 100644
--- a/bin/testfiles/GenTest27.expected.jmx
+++ b/bin/testfiles/GenTest27.expected.jmx
@@ -869,7 +869,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest27.jmx b/bin/testfiles/GenTest27.jmx
index 3e706e5eed8..e9b82566204 100644
--- a/bin/testfiles/GenTest27.jmx
+++ b/bin/testfiles/GenTest27.jmx
@@ -869,7 +869,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest27_original.expected.jmx b/bin/testfiles/GenTest27_original.expected.jmx
index 5ca9fed3f85..4d45d3e78df 100644
--- a/bin/testfiles/GenTest27_original.expected.jmx
+++ b/bin/testfiles/GenTest27_original.expected.jmx
@@ -891,7 +891,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest27_original.jmx b/bin/testfiles/GenTest27_original.jmx
index 36fb50c1e1e..7067b098791 100644
--- a/bin/testfiles/GenTest27_original.jmx
+++ b/bin/testfiles/GenTest27_original.jmx
@@ -891,7 +891,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/GenTest2_13.expected.jmx b/bin/testfiles/GenTest2_13.expected.jmx
index a7e34b2ca20..50f4dc38ca2 100644
--- a/bin/testfiles/GenTest2_13.expected.jmx
+++ b/bin/testfiles/GenTest2_13.expected.jmx
@@ -898,7 +898,7 @@
-
+
Assertion.response_data
false
16
diff --git a/bin/testfiles/GenTest2_13.jmx b/bin/testfiles/GenTest2_13.jmx
index 01ba6b907d5..e28553da25e 100644
--- a/bin/testfiles/GenTest2_13.jmx
+++ b/bin/testfiles/GenTest2_13.jmx
@@ -898,7 +898,7 @@
-
+
Assertion.response_data
false
16
diff --git a/bin/testfiles/GenTest3_0.expected.jmx b/bin/testfiles/GenTest3_0.expected.jmx
index 57ee9986bfb..0589f832046 100644
--- a/bin/testfiles/GenTest3_0.expected.jmx
+++ b/bin/testfiles/GenTest3_0.expected.jmx
@@ -910,7 +910,7 @@
-
+
Assertion.response_data
false
16
diff --git a/bin/testfiles/GenTest3_0.jmx b/bin/testfiles/GenTest3_0.jmx
index ff1a9427ecd..ba7f9de0ea3 100644
--- a/bin/testfiles/GenTest3_0.jmx
+++ b/bin/testfiles/GenTest3_0.jmx
@@ -910,7 +910,7 @@
-
+
Assertion.response_data
false
16
diff --git a/bin/testfiles/GuiTest.expected.jmx b/bin/testfiles/GuiTest.expected.jmx
index 8f922083361..de7177a02aa 100644
--- a/bin/testfiles/GuiTest.expected.jmx
+++ b/bin/testfiles/GuiTest.expected.jmx
@@ -40,7 +40,7 @@
-
+
diff --git a/bin/testfiles/GuiTest.jmx b/bin/testfiles/GuiTest.jmx
index 53f08e91fc5..44d34a1548b 100644
--- a/bin/testfiles/GuiTest.jmx
+++ b/bin/testfiles/GuiTest.jmx
@@ -40,7 +40,7 @@
-
+
diff --git a/bin/testfiles/GuiTest231.expected.jmx b/bin/testfiles/GuiTest231.expected.jmx
index 71a836aa17b..a890d91aed3 100644
--- a/bin/testfiles/GuiTest231.expected.jmx
+++ b/bin/testfiles/GuiTest231.expected.jmx
@@ -654,7 +654,7 @@
-
+
must match
Assertion.response_data
diff --git a/bin/testfiles/GuiTest231.jmx b/bin/testfiles/GuiTest231.jmx
index 7f847e05141..ea5395640d1 100644
--- a/bin/testfiles/GuiTest231.jmx
+++ b/bin/testfiles/GuiTest231.jmx
@@ -654,7 +654,7 @@
-
+
must match
Assertion.response_data
diff --git a/bin/testfiles/GuiTest231_original.expected.jmx b/bin/testfiles/GuiTest231_original.expected.jmx
index 19f3d6a1599..bebae042ff0 100644
--- a/bin/testfiles/GuiTest231_original.expected.jmx
+++ b/bin/testfiles/GuiTest231_original.expected.jmx
@@ -691,7 +691,7 @@
-
+
must match
Assertion.response_data
diff --git a/bin/testfiles/GuiTest231_original.jmx b/bin/testfiles/GuiTest231_original.jmx
index 8e0b0b4abe1..f2bd18d43f9 100644
--- a/bin/testfiles/GuiTest231_original.jmx
+++ b/bin/testfiles/GuiTest231_original.jmx
@@ -691,7 +691,7 @@
-
+
must match
Assertion.response_data
diff --git a/bin/testfiles/GuiTest_original.jmx b/bin/testfiles/GuiTest_original.jmx
index b8e45e2eeb6..49ae64a5d6c 100644
--- a/bin/testfiles/GuiTest_original.jmx
+++ b/bin/testfiles/GuiTest_original.jmx
@@ -40,7 +40,7 @@
-
+
diff --git a/bin/testfiles/Http4ImplDigestAuth.jmx b/bin/testfiles/Http4ImplDigestAuth.jmx
index 0f7e250aaf7..961052e9b53 100644
--- a/bin/testfiles/Http4ImplDigestAuth.jmx
+++ b/bin/testfiles/Http4ImplDigestAuth.jmx
@@ -91,7 +91,7 @@
-
+
Digest Authentication test page
Assertion.response_data
@@ -128,7 +128,7 @@
-
+
true
Assertion.response_data
@@ -141,7 +141,7 @@
-
+
Authorization: Digest
diff --git a/bin/testfiles/JDBC_TESTS.jmx b/bin/testfiles/JDBC_TESTS.jmx
index ff1705a823d..fd66aa808a9 100644
--- a/bin/testfiles/JDBC_TESTS.jmx
+++ b/bin/testfiles/JDBC_TESTS.jmx
@@ -97,7 +97,7 @@ sql.close()
-
+
0 updates
Assertion.response_data
@@ -122,7 +122,7 @@ sql.close()
-
+
0 updates
Assertion.response_data
@@ -147,7 +147,7 @@ sql.close()
-
+
0 updates
Assertion.response_data
@@ -179,7 +179,7 @@ sql.close()
-
+
0 updates
Assertion.response_data
@@ -209,7 +209,7 @@ sql.close()
-
+
0 updates
Assertion.response_data
@@ -238,7 +238,7 @@ sql.close()
-
+
0 updates
Assertion.response_data
@@ -279,7 +279,7 @@ sql.close()
-
+
1 updates
Assertion.response_data
@@ -303,7 +303,7 @@ sql.close()
-
+
1
Assertion.response_data
@@ -315,7 +315,7 @@ sql.close()
-
+
Mr
Assertion.response_data
@@ -327,7 +327,7 @@ sql.close()
-
+
Fiodor Dostoievski
Assertion.response_data
@@ -339,7 +339,7 @@ sql.close()
-
+
1
Assertion.response_data
@@ -388,7 +388,7 @@ if (list.size()==1) {
-
+
0
Assertion.response_data
@@ -400,7 +400,7 @@ if (list.size()==1) {
-
+
Mr
Assertion.response_data
@@ -412,7 +412,7 @@ if (list.size()==1) {
-
+
Philip K. Dick
Assertion.response_data
@@ -424,7 +424,7 @@ if (list.size()==1) {
-
+
2
Assertion.response_data
@@ -473,7 +473,7 @@ if (list.size()==2) {
-
+
Mr
Assertion.response_data
@@ -485,7 +485,7 @@ if (list.size()==2) {
-
+
Philip K. Dick
Assertion.response_data
@@ -497,7 +497,7 @@ if (list.size()==2) {
-
+
${__time(yyyy-MM-dd,)}
Assertion.response_data
@@ -509,7 +509,7 @@ if (list.size()==2) {
-
+
1
Assertion.response_data
@@ -558,7 +558,7 @@ if (list.size()==1) {
-
+
Mr
Assertion.response_data
@@ -570,7 +570,7 @@ if (list.size()==1) {
-
+
Philip K. Dick
Assertion.response_data
@@ -582,7 +582,7 @@ if (list.size()==1) {
-
+
${__time(yyyy-MM-dd,)}
Assertion.response_data
@@ -594,7 +594,7 @@ if (list.size()==1) {
-
+
1
Assertion.response_data
@@ -661,7 +661,7 @@ if (list.size()==1) {
-
+
1 updates
Assertion.response_data
@@ -773,7 +773,7 @@ if (list.size()==1) {
-
+
1 updates
Assertion.response_data
@@ -809,7 +809,7 @@ if (list.size()==1) {
-
+
2
Assertion.request_data
@@ -821,7 +821,7 @@ if (list.size()==1) {
-
+
3
Assertion.request_data
@@ -833,7 +833,7 @@ if (list.size()==1) {
-
+
1
Assertion.request_data
@@ -845,7 +845,7 @@ if (list.size()==1) {
-
+
1
Assertion.request_data
@@ -871,7 +871,7 @@ if (list.size()==1) {
-
+
0
Assertion.response_data
@@ -883,7 +883,7 @@ if (list.size()==1) {
-
+
0
Assertion.response_data
@@ -926,7 +926,7 @@ if (list.size()==0 && vars.get("ID_FURNITURE_1") == null &
-
+
1
Assertion.response_data
@@ -938,7 +938,7 @@ if (list.size()==0 && vars.get("ID_FURNITURE_1") == null &
-
+
conference table
Assertion.response_data
@@ -950,7 +950,7 @@ if (list.size()==0 && vars.get("ID_FURNITURE_1") == null &
-
+
1
Assertion.response_data
@@ -962,7 +962,7 @@ if (list.size()==0 && vars.get("ID_FURNITURE_1") == null &
-
+
1
Assertion.response_data
@@ -1011,7 +1011,7 @@ if (list.size()==1) {
-
+
5
Assertion.response_data
@@ -1023,7 +1023,7 @@ if (list.size()==1) {
-
+
coffee table
Assertion.response_data
@@ -1035,7 +1035,7 @@ if (list.size()==1) {
-
+
2
Assertion.response_data
@@ -1047,7 +1047,7 @@ if (list.size()==1) {
-
+
2
Assertion.response_data
@@ -1096,7 +1096,7 @@ if (list.size()==2) {
-
+
14
Assertion.response_data
@@ -1108,7 +1108,7 @@ if (list.size()==2) {
-
+
sofa
Assertion.response_data
@@ -1120,7 +1120,7 @@ if (list.size()==2) {
-
+
3
Assertion.response_data
@@ -1132,7 +1132,7 @@ if (list.size()==2) {
-
+
3
Assertion.response_data
@@ -1181,7 +1181,7 @@ if (list.size()==3) {
-
+
14
Assertion.response_data
@@ -1193,7 +1193,7 @@ if (list.size()==3) {
-
+
sofa
Assertion.response_data
@@ -1205,7 +1205,7 @@ if (list.size()==3) {
-
+
3
Assertion.response_data
@@ -1217,7 +1217,7 @@ if (list.size()==3) {
-
+
3
Assertion.response_data
@@ -1283,7 +1283,7 @@ if (list.size()==3) {
-
+
Name for DataSource must not be empty in JDBC_NoConfig
Assertion.response_message
@@ -1307,7 +1307,7 @@ if (list.size()==3) {
-
+
java.sql.SQLSyntaxErrorException:
Assertion.response_message
@@ -1332,7 +1332,7 @@ if (list.size()==3) {
-
+
1 updates
Assertion.response_data
@@ -1355,7 +1355,7 @@ if (list.size()==3) {
-
+
1
Assertion.request_data
@@ -1381,7 +1381,7 @@ if (list.size()==3) {
-
+
1 updates
Assertion.response_data
@@ -1404,7 +1404,7 @@ if (list.size()==3) {
-
+
1
Assertion.request_data
@@ -1430,7 +1430,7 @@ if (list.size()==3) {
-
+
1 updates
Assertion.response_data
@@ -1474,7 +1474,7 @@ if (list.size()==3) {
-
+
1 updates
Assertion.response_data
diff --git a/bin/testfiles/JMS_TESTS.jmx b/bin/testfiles/JMS_TESTS.jmx
index f56b7bc7918..9bb01f85714 100644
--- a/bin/testfiles/JMS_TESTS.jmx
+++ b/bin/testfiles/JMS_TESTS.jmx
@@ -100,7 +100,7 @@ try {
-
+
Test
Assertion.response_data
@@ -178,7 +178,7 @@ class MyMessageListener implements MessageListener {
-
+
Started Message Consumer
Assertion.response_data
@@ -209,7 +209,7 @@ class MyMessageListener implements MessageListener {
-
+
Reply to:Test
Assertion.response_data
@@ -244,7 +244,7 @@ class MyMessageListener implements MessageListener {
-
+
Test-with-customer-correlationId
Assertion.response_data
@@ -285,7 +285,7 @@ class MyMessageListener implements MessageListener {
-
+
No reply message received
Assertion.response_message
@@ -326,7 +326,7 @@ class MyMessageListener implements MessageListener {
-
+
Test-with-customer-correlationId-and-jms-properties-matching-selector
Assertion.response_data
@@ -361,7 +361,7 @@ class MyMessageListener implements MessageListener {
-
+
Oneway request has no response data
Assertion.response_data
@@ -426,7 +426,7 @@ finally {
-
+
Received : Test-send-only
Assertion.response_data
@@ -462,7 +462,7 @@ finally {
-
+
Oneway request has no response data
Assertion.response_data
@@ -510,7 +510,7 @@ finally {
-
+
requestQueue5 has 1 messages
Assertion.response_data
@@ -540,7 +540,7 @@ finally {
-
+
Test-send-only-for-count-and-read
Assertion.response_data
@@ -576,7 +576,7 @@ finally {
-
+
Oneway request has no response data
Assertion.response_data
@@ -620,7 +620,7 @@ finally {
-
+
requestQueue6: 1 message(s) removed
Assertion.response_data
@@ -656,7 +656,7 @@ finally {
-
+
requestQueue6 has 0 messages
Assertion.response_data
@@ -687,7 +687,7 @@ finally {
-
+
No reply message received
Assertion.response_message
@@ -761,7 +761,7 @@ finally {
-
+
1 messages published
Assertion.response_message
@@ -786,7 +786,7 @@ finally {
-
+
1 message(s) received successfully of 1 expected
Assertion.response_message
@@ -795,7 +795,7 @@ finally {
-
+
Test Topic
Assertion.response_data
@@ -804,7 +804,7 @@ finally {
-
+
Properties:
prop1 value1
propBoolean true
@@ -884,7 +884,7 @@ propFloat 1.2
-
+
1 messages published
Assertion.response_message
@@ -924,7 +924,7 @@ propFloat 1.2
-
+
404
Assertion.response_code
@@ -964,7 +964,7 @@ propFloat 1.2
-
+
Test Topic
Assertion.response_data
@@ -1039,7 +1039,7 @@ propFloat 1.2
-
+
1 messages published
Assertion.response_message
@@ -1079,7 +1079,7 @@ propFloat 1.2
-
+
404
Assertion.response_code
@@ -1119,7 +1119,7 @@ propFloat 1.2
-
+
Test Topic
Assertion.response_data
@@ -1194,7 +1194,7 @@ propFloat 1.2
-
+
1 messages published
Assertion.response_message
@@ -1235,7 +1235,7 @@ propFloat 1.2
-
+
Test Durable Topic Message
Assertion.response_data
@@ -1310,7 +1310,7 @@ propFloat 1.2
-
+
1 messages published
Assertion.response_message
@@ -1339,7 +1339,7 @@ propFloat 1.2
-
+
404
Assertion.response_code
@@ -1367,7 +1367,7 @@ propFloat 1.2
-
+
Test Topic
Assertion.response_data
diff --git a/bin/testfiles/OS_TESTS.jmx b/bin/testfiles/OS_TESTS.jmx
index e032a3a559d..c277b884bd3 100644
--- a/bin/testfiles/OS_TESTS.jmx
+++ b/bin/testfiles/OS_TESTS.jmx
@@ -61,7 +61,7 @@
-
+
README.md
Assertion.response_data
@@ -70,7 +70,7 @@
-
+
MY_ENV_PROP=TEST
Assertion.request_data
@@ -99,7 +99,7 @@
-
+
MY_ENV_PROP=TEST
Assertion.response_data
@@ -135,7 +135,7 @@
-
+
Process timeout reached after 1000 milliseconds
Assertion.response_message
@@ -144,7 +144,7 @@
-
+
500
Assertion.response_code
@@ -196,7 +196,7 @@
-
+
README.md
Assertion.response_data
@@ -205,7 +205,7 @@
-
+
MY_ENV_PROP=TEST
Assertion.request_data
@@ -245,7 +245,7 @@
-
+
MY_ENV_PROP=TEST
Assertion.response_data
@@ -292,7 +292,7 @@
-
+
Process timeout reached after 1000 milliseconds
Assertion.response_message
@@ -301,7 +301,7 @@
-
+
500
Assertion.response_code
diff --git a/bin/testfiles/ResponseDecompression.jmx b/bin/testfiles/ResponseDecompression.jmx
index aa96379e50d..d2ff299dbdc 100644
--- a/bin/testfiles/ResponseDecompression.jmx
+++ b/bin/testfiles/ResponseDecompression.jmx
@@ -65,7 +65,7 @@
-
+
Content-Encoding: deflate
content-encoding: deflate
@@ -104,7 +104,7 @@
-
+
Microsoft
bing
@@ -131,7 +131,7 @@
-
+
Content-Encoding: br
content-encoding: br
@@ -170,7 +170,7 @@
-
+
facebook
Assertion.response_data
diff --git a/bin/testfiles/SavedGenTest210.jmx b/bin/testfiles/SavedGenTest210.jmx
index 34b73bf3dfb..7f882046084 100644
--- a/bin/testfiles/SavedGenTest210.jmx
+++ b/bin/testfiles/SavedGenTest210.jmx
@@ -892,7 +892,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/SavedGenTest27.jmx b/bin/testfiles/SavedGenTest27.jmx
index feea3f07a70..d063341b6e4 100644
--- a/bin/testfiles/SavedGenTest27.jmx
+++ b/bin/testfiles/SavedGenTest27.jmx
@@ -869,7 +869,7 @@
-
+
Assertion.response_data
false
2
diff --git a/bin/testfiles/SavedGenTest2_13.jmx b/bin/testfiles/SavedGenTest2_13.jmx
index 0f9f4d0a511..7bb023e4304 100644
--- a/bin/testfiles/SavedGenTest2_13.jmx
+++ b/bin/testfiles/SavedGenTest2_13.jmx
@@ -898,7 +898,7 @@
-
+
Assertion.response_data
false
16
diff --git a/bin/testfiles/SavedGenTest3_0.jmx b/bin/testfiles/SavedGenTest3_0.jmx
index af691e9c1c3..22fe7391aab 100644
--- a/bin/testfiles/SavedGenTest3_0.jmx
+++ b/bin/testfiles/SavedGenTest3_0.jmx
@@ -910,7 +910,7 @@
-
+
Assertion.response_data
false
16
diff --git a/bin/testfiles/SavedGuiTest.jmx b/bin/testfiles/SavedGuiTest.jmx
index a721344ffbf..a79f1f70a3e 100644
--- a/bin/testfiles/SavedGuiTest.jmx
+++ b/bin/testfiles/SavedGuiTest.jmx
@@ -40,7 +40,7 @@
-
+
diff --git a/bin/testfiles/SavedGuiTest231.jmx b/bin/testfiles/SavedGuiTest231.jmx
index 50bbed3082c..e058427e180 100644
--- a/bin/testfiles/SavedGuiTest231.jmx
+++ b/bin/testfiles/SavedGuiTest231.jmx
@@ -654,7 +654,7 @@
-
+
must match
Assertion.response_data
diff --git a/bin/testfiles/SlowCharsFeature.jmx b/bin/testfiles/SlowCharsFeature.jmx
index 17a8e2ee152..229d1579a3b 100644
--- a/bin/testfiles/SlowCharsFeature.jmx
+++ b/bin/testfiles/SlowCharsFeature.jmx
@@ -82,7 +82,7 @@ SampleResult.setBytes(0);
-
+
206
Assertion.response_code
@@ -92,7 +92,7 @@ SampleResult.setBytes(0);
-
+
HTTP/1.1 206 Partial [Cc]ontent
Assertion.response_headers
@@ -164,7 +164,7 @@ SampleResult.setBytes(0);
-
+
Apache JMeter
Assertion.response_data
@@ -211,7 +211,7 @@ SampleResult.setBytes(0);
-
+
<meta property="og:title" content="analytics.usa.gov | The US government's web traffic." />
Assertion.response_data
@@ -221,7 +221,7 @@ SampleResult.setBytes(0);
-
+
javax.net.ssl.SSLHandshakeException
handshake_failure
@@ -253,7 +253,7 @@ SampleResult.setBytes(0);
-
+
<meta property="og:title" content="analytics.usa.gov | The US government's web traffic." />
Assertion.response_data
@@ -263,7 +263,7 @@ SampleResult.setBytes(0);
-
+
javax.net.ssl.SSLHandshakeException
handshake_failure
diff --git a/bin/testfiles/TCP_TESTS.jmx b/bin/testfiles/TCP_TESTS.jmx
index d646bef3a0f..3098900476a 100644
--- a/bin/testfiles/TCP_TESTS.jmx
+++ b/bin/testfiles/TCP_TESTS.jmx
@@ -182,7 +182,7 @@ vars.put("CR",URLDecoder.decode("%0A", "ASCII"));
-
+
${__time(dd/MM/yyyy HH:mm,)}
Assertion.response_data
@@ -207,7 +207,7 @@ vars.put("CR",URLDecoder.decode("%0A", "ASCII"));
-
+
500
Assertion.response_code
@@ -216,7 +216,7 @@ vars.put("CR",URLDecoder.decode("%0A", "ASCII"));
-
+
org.apache.jmeter.protocol.tcp.sampler.ReadException
Assertion.response_message
@@ -277,7 +277,7 @@ vars.put("result_decoded", decoded);
-
+
${__time(dd/MM/yyyy HH:mm,)}
Assertion.response_data
@@ -303,7 +303,7 @@ vars.put("result_decoded", decoded);
-
+
500
Assertion.response_code
@@ -312,7 +312,7 @@ vars.put("result_decoded", decoded);
-
+
org.apache.jmeter.protocol.tcp.sampler.ReadException
Assertion.response_message
@@ -362,7 +362,7 @@ vars.put("result_decoded", decoded);
-
+
500
Assertion.response_code
@@ -372,7 +372,7 @@ vars.put("result_decoded", decoded);
-
+
java.net.ConnectException: Connection refused
Assertion.response_message
@@ -415,7 +415,7 @@ if (oldResponseMessage != null && oldResponseMessage.contains("java
-
+
500
Assertion.response_code
@@ -425,7 +425,7 @@ if (oldResponseMessage != null && oldResponseMessage.contains("java
-
+
java.net.UnknownHostException: localhostXXXX
Assertion.response_message
@@ -449,7 +449,7 @@ if (oldResponseMessage != null && oldResponseMessage.contains("java
-
+
500
Assertion.response_code
@@ -459,7 +459,7 @@ if (oldResponseMessage != null && oldResponseMessage.contains("java
-
+
Protocol handler not found
Assertion.response_message
@@ -508,7 +508,7 @@ vars.put("result_decoded", decoded);
-
+
${__time(dd/MM/yyyy HH:mm,)}
Assertion.response_data
diff --git a/bin/testfiles/TEST_HTTP.jmx b/bin/testfiles/TEST_HTTP.jmx
index da93b79e0a8..09677874e5a 100644
--- a/bin/testfiles/TEST_HTTP.jmx
+++ b/bin/testfiles/TEST_HTTP.jmx
@@ -76,7 +76,7 @@ mirrorServer.start();
-
+
GET /test HTTP/1.1
Connection: keep-alive
Host: localhost:8081
@@ -89,7 +89,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -129,7 +129,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -140,7 +140,7 @@ mirrorServer.start();
-
+
GET
Connection: keep-alive
Host: localhost:8081
@@ -182,7 +182,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -193,7 +193,7 @@ mirrorServer.start();
-
+
GET
Connection: keep-alive
Host: localhost:8081
@@ -240,7 +240,7 @@ mirrorServer.start();
-
+
Content-Length: 13
Content-Type: text/plain
Content-Type:
@@ -252,7 +252,7 @@ mirrorServer.start();
-
+
GET /test HTTP/1.1
Connection: keep-alive
Host: localhost:8081
@@ -340,7 +340,7 @@ mirrorServer.start();
-
+
Accept-Encoding: gzip
Assertion.request_headers
@@ -350,7 +350,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -361,7 +361,7 @@ mirrorServer.start();
-
+
Example Domain
Assertion.response_data
@@ -391,7 +391,7 @@ mirrorServer.start();
-
+
Content-Encoding: gzip
Assertion.response_headers
@@ -401,7 +401,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -412,7 +412,7 @@ mirrorServer.start();
-
+
Accept-Encoding: gzip
Assertion.request_headers
@@ -422,7 +422,7 @@ mirrorServer.start();
-
+
Example Domain
Assertion.response_data
@@ -499,7 +499,7 @@ mirrorServer.start();
-
+
Accept-Encoding: gzip
Assertion.request_headers
@@ -509,7 +509,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -571,7 +571,7 @@ mirrorServer.start();
-
+
Accept-Encoding: gzip
Assertion.request_headers
@@ -581,7 +581,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -637,7 +637,7 @@ mirrorServer.start();
-
+
Exceeded maximum number of redirects
Assertion.response_message
@@ -647,7 +647,7 @@ mirrorServer.start();
-
+
Content-Length:
Content-Type:
@@ -695,7 +695,7 @@ mirrorServer.start();
-
+
Non HTTP response message
Assertion.response_message
@@ -772,7 +772,7 @@ mirrorServer.start();
-
+
POST /test?name0=value0 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip
@@ -833,7 +833,7 @@ mirrorServer.start();
-
+
POST /test?name0=value0 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip
@@ -908,7 +908,7 @@ mirrorServer.start();
-
+
POST /test?name0=value0 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip
@@ -987,7 +987,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
POST /test?name0=value0 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip
@@ -1003,7 +1003,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
nv_contentType
text/plain; charset=UTF-8
@@ -1063,7 +1063,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
POST /test?name0=value0 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip
@@ -1121,7 +1121,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Content-Type: multipart/form-data; boundary=
Content-Disposition: form-data; name="fileName"; filename="user.properties"
Content-Transfer-Encoding: binary
@@ -1134,7 +1134,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Sample user.properties file
Host: localhost:8081
User-Agent:
@@ -1146,7 +1146,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Connection: keep-alive
Accept-Encoding: gzip
Content-Type: text/plain
@@ -1201,7 +1201,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Content-Type: multipart/form-data; boundary=
Content-Disposition: form-data; name="fileName"; filename="user.properties"
Content-Transfer-Encoding: binary
@@ -1215,7 +1215,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Sample user.properties file
User-Agent:
Host: localhost:8081
@@ -1227,7 +1227,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Connection: keep-alive
Accept-Encoding: gzip
Content-Type: text/plain
@@ -1282,7 +1282,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Content-Type: multipart/form-data; boundary=
Content-Disposition: form-data; name="fileName"; filename="user.properties"
Content-Transfer-Encoding: binary
@@ -1295,7 +1295,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Sample user.properties file
PUT /test?name0=value0 HTTP/1.1
Host: localhost:8081
@@ -1308,7 +1308,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Connection: keep-alive
Accept-Encoding: gzip
Content-Type: text/plain
@@ -1361,7 +1361,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Content-Type: multipart/form-data; boundary=
Content-Disposition: form-data; name="fileName"; filename="user.properties"
Content-Transfer-Encoding: binary
@@ -1374,7 +1374,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
PUT /test?name0=value0 HTTP/1.1
Body of Put
User-Agent:
@@ -1386,7 +1386,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Connection: keep-alive
Accept-Encoding: gzip
Content-Type: text/plain
@@ -1442,7 +1442,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Content-Type: multipart/form-data; boundary=
Content-Disposition: form-data; name="fileName"; filename="user.properties"
Content-Transfer-Encoding: binary
@@ -1456,7 +1456,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
PUT /test?name0=value0 HTTP/1.1
Host: localhost:8081
User-Agent:
@@ -1468,7 +1468,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Connection: keep-alive
Accept-Encoding: gzip
@@ -1523,7 +1523,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Content-Type: multipart/form-data; boundary=
Content-Disposition: form-data; name="fileName"; filename="user.properties"
Content-Transfer-Encoding: binary
@@ -1537,7 +1537,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
PUT /test?name0=value0 HTTP/1.1
Host: localhost:8081
User-Agent:
@@ -1550,7 +1550,7 @@ if(prev.getSamplerData().indexOf(textToCheck) < 0) {
-
+
Connection: keep-alive
Accept-Encoding: gzip
diff --git a/bin/testfiles/TEST_HTTPS.jmx b/bin/testfiles/TEST_HTTPS.jmx
index 6ffa072c54a..4fc4e1adb3c 100644
--- a/bin/testfiles/TEST_HTTPS.jmx
+++ b/bin/testfiles/TEST_HTTPS.jmx
@@ -47,7 +47,7 @@
-
+
Apache JMeter
Assertion.response_data
@@ -56,7 +56,7 @@
-
+
javax.net.ssl.SSLHandshakeException
handshake_failure
diff --git a/bin/testfiles/Test Plan_out.jmx b/bin/testfiles/Test Plan_out.jmx
index a87bdaf3dc0..58e749d170a 100644
--- a/bin/testfiles/Test Plan_out.jmx
+++ b/bin/testfiles/Test Plan_out.jmx
@@ -36,7 +36,7 @@
-
+
diff --git a/bin/testfiles/TestCookieManager.jmx b/bin/testfiles/TestCookieManager.jmx
index 9f6c551918d..23024ae7b09 100644
--- a/bin/testfiles/TestCookieManager.jmx
+++ b/bin/testfiles/TestCookieManager.jmx
@@ -121,7 +121,7 @@ mirrorServer.start();
-
+
Cookie: myCookie=value1; myCookie2=value2
Assertion.response_data
@@ -130,7 +130,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; myCookie2=value2
@@ -160,7 +160,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; mySecureCookie=value3; myCookie2=value2
@@ -252,7 +252,7 @@ mirrorServer.start();
-
+
Cookie: myCookie=value1; myCookie2=value2
Assertion.response_data
@@ -261,7 +261,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; myCookie2=value2
@@ -291,7 +291,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; mySecureCookie=value3; myCookie2=value2
@@ -344,7 +344,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; myCookie2=value2
@@ -354,7 +354,7 @@ mirrorServer.start();
-
+
Cookie: myCookie=value1; myCookie2=value2
Assertion.response_data
@@ -392,7 +392,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; mySecureCookie=value3; myCookie2=value2
@@ -460,7 +460,7 @@ mirrorServer.start();
-
+
Cookie: myCookie=value1; myCookie2=value2
Assertion.response_data
@@ -469,7 +469,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; myCookie2=value2
@@ -508,7 +508,7 @@ mirrorServer.start();
-
+
Cookie Data:
myCookie=value1; mySecureCookie=value3; myCookie2=value2
diff --git a/bin/testfiles/TestHeaderManager.jmx b/bin/testfiles/TestHeaderManager.jmx
index 497c77e2126..646b61bc93b 100644
--- a/bin/testfiles/TestHeaderManager.jmx
+++ b/bin/testfiles/TestHeaderManager.jmx
@@ -103,7 +103,7 @@
-
+
Header1: val1_0\b
Header2: val2_0_overriden\b
@@ -155,7 +155,7 @@
-
+
Header1: val1_1\b
Header2: val2_1_overriden\b
Header4: val4_1\b
@@ -169,7 +169,7 @@
-
+
Header1: val1\b
Header2: val2\b
@@ -216,7 +216,7 @@
-
+
Header1: val1\b
Header2: val2\b
Header3: val3\b
@@ -228,7 +228,7 @@
-
+
Header4
Header5
@@ -241,7 +241,7 @@
-
+
Connection: keep-alive
Assertion.request_headers
diff --git a/bin/testfiles/TestKeepAlive.jmx b/bin/testfiles/TestKeepAlive.jmx
index a6c580f889e..719d5caf5b3 100644
--- a/bin/testfiles/TestKeepAlive.jmx
+++ b/bin/testfiles/TestKeepAlive.jmx
@@ -107,7 +107,7 @@ JMeterUtils.setProperty("httpclient4.time_to_live", ttl.toString());
-
+
Connection: close
Assertion.response_headers
@@ -117,7 +117,7 @@ JMeterUtils.setProperty("httpclient4.time_to_live", ttl.toString());
-
+
Connection: close
Assertion.request_headers
@@ -149,7 +149,7 @@ JMeterUtils.setProperty("httpclient4.time_to_live", ttl.toString());
-
+
Keep-Alive: timeout=30, max=100
Assertion.response_headers
@@ -209,7 +209,7 @@ vars.put("thirdPause",thirdPause.toString());
-
+
Keep-Alive: timeout=30, max=99
Assertion.response_headers
@@ -250,7 +250,7 @@ vars.put("thirdPause",thirdPause.toString());
-
+
Keep-Alive: timeout=30, max=98
Assertion.response_headers
@@ -291,7 +291,7 @@ vars.put("thirdPause",thirdPause.toString());
-
+
Keep-Alive: timeout=30, max=97
Assertion.response_headers
@@ -332,7 +332,7 @@ vars.put("thirdPause",thirdPause.toString());
-
+
Keep-Alive: timeout=30, max=100
Connection has exceeded its TTL
@@ -374,7 +374,7 @@ vars.put("thirdPause",thirdPause.toString());
-
+
Keep-Alive: timeout=30, max=100
Connection has exceeded its TTL
@@ -387,7 +387,7 @@ vars.put("thirdPause",thirdPause.toString());
-
+
Connection: keep-alive
Assertion.request_headers
diff --git a/bin/testfiles/TestRedirectionPolicies.jmx b/bin/testfiles/TestRedirectionPolicies.jmx
index 0f24954f686..74b232af72b 100644
--- a/bin/testfiles/TestRedirectionPolicies.jmx
+++ b/bin/testfiles/TestRedirectionPolicies.jmx
@@ -59,7 +59,7 @@
-
+
200
@@ -84,7 +84,7 @@
-
+
https://httpbin.org/get
@@ -116,7 +116,7 @@
-
+
302
@@ -154,7 +154,7 @@
-
+
200
@@ -179,7 +179,7 @@
-
+
https://httpbin.org/get
@@ -225,7 +225,7 @@
-
+
302
@@ -263,7 +263,7 @@
-
+
200
@@ -288,7 +288,7 @@
-
+
https://httpbin.org/get
@@ -320,7 +320,7 @@
-
+
200
@@ -345,7 +345,7 @@
-
+
https://httpbin.org/get
diff --git a/extras/Test.jmx b/extras/Test.jmx
index 96f1e0655a1..853a9d42582 100644
--- a/extras/Test.jmx
+++ b/extras/Test.jmx
@@ -82,7 +82,7 @@
-
+
3
Assertion.response_data
diff --git a/src/components/src/main/java/org/apache/jmeter/assertions/ResponseAssertion.java b/src/components/src/main/java/org/apache/jmeter/assertions/ResponseAssertion.java
index f7df66aaa2f..01e4286cd98 100644
--- a/src/components/src/main/java/org/apache/jmeter/assertions/ResponseAssertion.java
+++ b/src/components/src/main/java/org/apache/jmeter/assertions/ResponseAssertion.java
@@ -64,7 +64,12 @@ public class ResponseAssertion extends AbstractScopedAssertion implements Serial
private static final String REQUEST_HEADERS = "Assertion.request_headers"; // $NON-NLS-1$
private static final String REQUEST_DATA = "Assertion.request_data"; // $NON-NLS-1$
private static final String ASSUME_SUCCESS = "Assertion.assume_success"; // $NON-NLS-1$
- private static final String TEST_STRINGS = "Asserion.test_strings"; // $NON-NLS-1$
+ private static final String TEST_STRINGS = "Assertion.test_strings"; // $NON-NLS-1$
+ /**
+ * Misspelled historical name of {@link #TEST_STRINGS}, it was used by JMeter versions up to and including 5.6.3.
+ * It is still read to keep test plans saved by those versions working.
+ */
+ private static final String LEGACY_TEST_STRINGS = "Asserion.test_strings"; // $NON-NLS-1$
private static final String TEST_TYPE = "Assertion.test_type"; // $NON-NLS-1$
private static final String CUSTOM_MESSAGE = "Assertion.custom_message"; // $NON-NLS-1$
@@ -218,6 +223,17 @@ public int getTestType() {
return type.getIntValue();
}
+ @Override
+ public void setProperty(JMeterProperty property) {
+ if (LEGACY_TEST_STRINGS.equals(property.getName())) {
+ // Migrate the test patterns that were saved under the misspelled
+ // property name by JMeter versions up to and including 5.6.3, so that
+ // test plans saved by those versions keep working (see issue #6289)
+ property.setName(TEST_STRINGS);
+ }
+ super.setProperty(property);
+ }
+
public CollectionProperty getTestStrings() {
return (CollectionProperty) getProperty(TEST_STRINGS);
}
diff --git a/src/components/src/test/java/org/apache/jmeter/assertions/ResponseAssertionTest.java b/src/components/src/test/java/org/apache/jmeter/assertions/ResponseAssertionTest.java
index e303737d40f..a11bdc78159 100644
--- a/src/components/src/test/java/org/apache/jmeter/assertions/ResponseAssertionTest.java
+++ b/src/components/src/test/java/org/apache/jmeter/assertions/ResponseAssertionTest.java
@@ -19,6 +19,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
@@ -26,10 +27,14 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.testelement.property.CollectionProperty;
+import org.apache.jmeter.testelement.property.NullProperty;
+import org.apache.jmeter.testelement.property.StringProperty;
import org.apache.jmeter.threads.JMeterContext;
import org.apache.jmeter.threads.JMeterContextService;
import org.apache.jmeter.threads.JMeterVariables;
@@ -375,4 +380,53 @@ public void run() {
}
}
}
+
+ private static final String CORRECT_TEST_STRINGS_NAME = "Assertion.test_strings";
+ private static final String MISSPELLED_TEST_STRINGS_NAME = "Asserion.test_strings";
+
+ @Test
+ public void testPatternsAreStoredUnderCorrectPropertyName() {
+ ResponseAssertion responseAssertion = new ResponseAssertion();
+ responseAssertion.addTestString("pattern");
+ CollectionProperty testStrings = responseAssertion.getTestStrings();
+ assertEquals(1, testStrings.size());
+ assertEquals("pattern", testStrings.iterator().next().getStringValue());
+ // The patterns must be stored under the correctly spelled name
+ assertEquals(CORRECT_TEST_STRINGS_NAME, testStrings.getName());
+ // ... and not under the misspelled one
+ assertInstanceOf(NullProperty.class, responseAssertion.getProperty(MISSPELLED_TEST_STRINGS_NAME));
+ }
+
+ @Test
+ public void testPatternsSavedWithMisspelledPropertyNameAreMigrated() {
+ ResponseAssertion responseAssertion = new ResponseAssertion();
+ // Simulate a test plan saved by JMeter versions up to and including 5.6.3,
+ // which stored the patterns under the misspelled property name
+ CollectionProperty legacy = new CollectionProperty(MISSPELLED_TEST_STRINGS_NAME, new ArrayList<>());
+ legacy.addProperty(new StringProperty("legacy", "legacy pattern"));
+ responseAssertion.setProperty(legacy);
+
+ CollectionProperty testStrings = responseAssertion.getTestStrings();
+ assertEquals(1, testStrings.size());
+ assertEquals("legacy pattern", testStrings.iterator().next().getStringValue());
+ // The patterns must have been migrated to the correctly spelled name
+ assertEquals(CORRECT_TEST_STRINGS_NAME, testStrings.getName());
+ // ... and the legacy property must have been removed, so that re-saved
+ // test plans use the correct name only
+ assertInstanceOf(NullProperty.class, responseAssertion.getProperty(MISSPELLED_TEST_STRINGS_NAME));
+ }
+
+ @Test
+ public void testPatternsAreAddedToMigratedValues() {
+ ResponseAssertion responseAssertion = new ResponseAssertion();
+ CollectionProperty legacy = new CollectionProperty(MISSPELLED_TEST_STRINGS_NAME, new ArrayList<>());
+ legacy.addProperty(new StringProperty("legacy", "legacy pattern"));
+ responseAssertion.setProperty(legacy);
+
+ responseAssertion.addTestString("new pattern");
+
+ CollectionProperty testStrings = responseAssertion.getTestStrings();
+ assertEquals(2, testStrings.size());
+ assertEquals(CORRECT_TEST_STRINGS_NAME, testStrings.getName());
+ }
}
diff --git a/src/core/src/main/resources/org/apache/jmeter/gui/action/schematic.xsl b/src/core/src/main/resources/org/apache/jmeter/gui/action/schematic.xsl
index 8de641091d0..404c9205c0f 100644
--- a/src/core/src/main/resources/org/apache/jmeter/gui/action/schematic.xsl
+++ b/src/core/src/main/resources/org/apache/jmeter/gui/action/schematic.xsl
@@ -282,7 +282,7 @@ ul.tree li:last-child {
[
-
+
"