From a301c9d41dc51b6f0e8bd557c90572cf3e29a2b2 Mon Sep 17 00:00:00 2001 From: Joaquin Araujo Date: Mon, 21 Oct 2024 23:05:50 +0100 Subject: [PATCH] Release v3.1 --- pom.xml | 2 +- releases.json | 14 + .../correlation/core/CorrelationEngine.java | 6 + .../correlation/core/analysis/Analysis.java | 7 +- .../core/analysis/AnalysisReporter.java | 286 ++++++++---------- .../core/automatic/CorrelationSuggestion.java | 31 +- .../core/automatic/ExtractionSuggestion.java | 10 + .../core/automatic/JMeterElementUtils.java | 13 +- .../core/automatic/ReplacementSuggestion.java | 10 + .../core/automatic/WaitingDialog.java | 102 +++++++ .../core/extractors/CorrelationExtractor.java | 8 +- .../extractors/JsonCorrelationExtractor.java | 2 +- .../extractors/RegexCorrelationExtractor.java | 6 +- .../replacements/CorrelationReplacement.java | 75 +++-- .../JsonCorrelationReplacement.java | 2 +- .../RegexCorrelationReplacement.java | 3 +- .../InterruptibleWorkerAgreement.java | 29 ++ .../core/suggestions/SuggestionGenerator.java | 20 +- .../SuggestionsApplianceWorker.java | 180 +++++++++++ .../core/suggestions/SuggestionsUtils.java | 35 ++- .../suggestions/method/AnalysisMethod.java | 31 +- .../suggestions/method/ComparisonMethod.java | 63 ++-- .../suggestions/method/CorrelationMethod.java | 3 +- .../core/suggestions/method/LegacyMethod.java | 5 - .../core/templates/SiebelTemplateRemoval.java | 17 +- .../CorrelationTemplatesSelectionPanel.java | 157 +++------- .../TemplateSuggestionsGeneratorWorker.java | 232 ++++++++++++++ .../automatic/CorrelationHistoryFrame.java | 47 ++- .../CorrelationSuggestionsPanel.java | 68 ++--- .../gui/automatic/CorrelationWizard.java | 133 ++------ .../core/analysis/AnalysisReporterTest.java | 26 +- .../core/analysis/AnalysisTest.java | 64 ++-- .../suggestions/SuggestionGeneratorIT.java | 34 +-- .../suggestions/SuggestionGeneratorTest.java | 9 +- .../templates/SiebelTemplateRemovalTest.java | 33 +- .../CorrelationSuggestionsPanelTest.java | 29 +- .../gui/automatic/CorrelationWizardIT.java | 10 - 37 files changed, 1111 insertions(+), 691 deletions(-) create mode 100644 src/main/java/com/blazemeter/jmeter/correlation/core/automatic/WaitingDialog.java create mode 100644 src/main/java/com/blazemeter/jmeter/correlation/core/suggestions/InterruptibleWorkerAgreement.java create mode 100644 src/main/java/com/blazemeter/jmeter/correlation/core/suggestions/SuggestionsApplianceWorker.java create mode 100644 src/main/java/com/blazemeter/jmeter/correlation/gui/analysis/TemplateSuggestionsGeneratorWorker.java diff --git a/pom.xml b/pom.xml index f3a26ed..bf5c0b9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.blazemeter jmeter-bzm-correlation-recorder jar - 3.0 + 3.1 Auto Correlation Recorder Auto Correlation Recorder as JMeter Plugin https://github.com/Blazemeter/CorrelationRecorder diff --git a/releases.json b/releases.json index 1190e9c..6f40e02 100644 --- a/releases.json +++ b/releases.json @@ -40,5 +40,19 @@ "json>=20190722", "maven-artifact>=3.8.4" ] + }, + { + "version": "3.1", + "what_is_new": "Many improvements in generation of suggestions from templates!", + "dependencies": [ + "jackson-dataformat-xml>=2.10.3", + "jackson-annotations>=2.13.3", + "jackson-databind>=2.10.3", + "jackson-core>=2.13.3", + "jackson-module-jaxb-annotations>=2.10.3", + "jmeter-bzm-commons>=0.2.1", + "json>=20190722", + "maven-artifact>=3.8.4" + ] } ] diff --git a/src/main/java/com/blazemeter/jmeter/correlation/core/CorrelationEngine.java b/src/main/java/com/blazemeter/jmeter/correlation/core/CorrelationEngine.java index 897f257..fb3c537 100644 --- a/src/main/java/com/blazemeter/jmeter/correlation/core/CorrelationEngine.java +++ b/src/main/java/com/blazemeter/jmeter/correlation/core/CorrelationEngine.java @@ -88,6 +88,9 @@ public synchronized void process(HTTPSamplerBase sampler, List chil JMeterContextService.getContext().setVariables(vars); // Using for instead of streams to avoid ConcurrentModificationException for (CorrelationRule rule : rules) { + if (Thread.currentThread().isInterrupted()) { + break; + } if (rule.isEnabled() && rule.getCorrelationReplacement() != null) { try { rule.getCorrelationReplacement().process(sampler, children, result, vars); @@ -106,6 +109,9 @@ public synchronized void process(HTTPSamplerBase sampler, List chil if (isContentTypeAllowed(result, responseFilter)) { // Using for instead of streams to avoid ConcurrentModificationException for (CorrelationRule rule : rules) { + if (Thread.currentThread().isInterrupted()) { + break; + } if (rule.isEnabled() && rule.getCorrelationExtractor() != null) { try { rule.getCorrelationExtractor().process(sampler, children, result, vars); diff --git a/src/main/java/com/blazemeter/jmeter/correlation/core/analysis/Analysis.java b/src/main/java/com/blazemeter/jmeter/correlation/core/analysis/Analysis.java index 5112413..724d6a8 100644 --- a/src/main/java/com/blazemeter/jmeter/correlation/core/analysis/Analysis.java +++ b/src/main/java/com/blazemeter/jmeter/correlation/core/analysis/Analysis.java @@ -67,14 +67,15 @@ public Map> run(List