You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2026/03/17 12:13:08 UTC
(streampipes) branch refactor-migrate-processing-element-tests created (now b03824d46c)
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a change to branch refactor-migrate-processing-element-tests
in repository https://gitbox.apache.org/repos/asf/streampipes.git
at b03824d46c refactor: migrate pipeline element e2e cases
This branch includes the following new commits:
new b03824d46c refactor: migrate pipeline element e2e cases
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(streampipes) 01/01: refactor: migrate pipeline element e2e cases
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch refactor-migrate-processing-element-tests
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit b03824d46c74eff387c677254bb1d90139b2769d
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Tue Mar 17 13:12:55 2026 +0100
refactor: migrate pipeline element e2e cases
---
.../jvm/processor/math/MathOpProcessorTest.java | 62 +++++-
.../staticmathop/StaticMathOpProcessorTest.java | 85 +++++++++
.../trigonometry/TrigonometryProcessorTest.java | 86 +++++++++
.../valuechange/ValueChangeProcessorTest.java | 69 +++++++
.../booleanfilter/TestBooleanFilterProcessor.java | 70 +++++++
.../processor/limit/RateLimitProcessorTest.java | 64 +++++++
.../NumericalFilterProcessorTest.java | 35 +++-
.../projection/TestProjectionProcessor.java | 51 +++--
.../textfilter/TestTextFilterProcessor.java | 71 +++++++
.../threshold/TestThresholdDetectionProcessor.java | 47 ++++-
.../array/count/CountArrayProcessorTest.java | 55 ++++++
.../array/split/SplitArrayProcessorTest.java} | 47 ++---
.../counter/TestBooleanCounterProcessor.java | 207 +++++++--------------
.../edge/SignalEdgeFilterProcessorTest.java | 65 +++++++
.../inverter/BooleanInverterProcessorTest.java | 67 +++++++
.../fieldrename/FiledRenameProcessorTest.java | 68 +++++++
.../processor/hasher/FieldHasherProcessorTest.java | 75 ++++++++
.../mapper/FieldMapperProcessorTest.java} | 46 ++---
.../executors/ProcessingElementTestExecutor.java | 24 +--
.../enrich-jvm/math1/description.json | 20 --
.../pipelineElement/enrich-jvm/math1/expected.csv | 3 -
.../pipelineElement/enrich-jvm/math1/input.csv | 3 -
.../enrich-jvm/math2/description.json | 20 --
.../pipelineElement/enrich-jvm/math2/expected.csv | 3 -
.../pipelineElement/enrich-jvm/math2/input.csv | 3 -
.../enrich-jvm/math3/description.json | 20 --
.../pipelineElement/enrich-jvm/math3/expected.csv | 3 -
.../pipelineElement/enrich-jvm/math3/input.csv | 3 -
.../enrich-jvm/staticmath1/description.json | 20 --
.../enrich-jvm/staticmath1/expected.csv | 3 -
.../enrich-jvm/staticmath1/input.csv | 3 -
.../enrich-jvm/staticmath2/description.json | 20 --
.../enrich-jvm/staticmath2/expected.csv | 3 -
.../enrich-jvm/staticmath2/input.csv | 3 -
.../enrich-jvm/trigonometry1/description.json | 15 --
.../enrich-jvm/trigonometry1/expected.csv | 3 -
.../enrich-jvm/trigonometry1/input.csv | 3 -
.../enrich-jvm/trigonometry2/description.json | 15 --
.../enrich-jvm/trigonometry2/expected.csv | 3 -
.../enrich-jvm/trigonometry2/input.csv | 3 -
.../enrich-jvm/valueChange1/description.json | 20 --
.../enrich-jvm/valueChange1/expected.csv | 11 --
.../enrich-jvm/valueChange1/input.csv | 11 --
.../filters-jvm/booleanFilter1/description.json | 15 --
.../filters-jvm/booleanFilter1/expected.csv | 6 -
.../filters-jvm/booleanFilter1/input.csv | 11 --
.../filters-jvm/booleanFilter2/description.json | 15 --
.../filters-jvm/booleanFilter2/expected.csv | 6 -
.../filters-jvm/booleanFilter2/input.csv | 11 --
.../filters-jvm/numericalFilter1/description.json | 12 --
.../filters-jvm/numericalFilter1/expected.csv | 6 -
.../filters-jvm/numericalFilter1/input.csv | 11 --
.../filters-jvm/projection1/description.json | 15 --
.../filters-jvm/projection1/expected.csv | 6 -
.../filters-jvm/projection1/input.csv | 6 -
.../filters-jvm/rateLimit1/description.json | 25 ---
.../filters-jvm/rateLimit1/expected.csv | 3 -
.../filters-jvm/rateLimit1/input.csv | 12 --
.../filters-jvm/textFilter1/description.json | 8 -
.../filters-jvm/textFilter1/expected.csv | 4 -
.../filters-jvm/textFilter1/input.csv | 11 --
.../filters-jvm/textFilter2/description.json | 8 -
.../filters-jvm/textFilter2/expected.csv | 5 -
.../filters-jvm/textFilter2/input.csv | 11 --
.../thresholdDetection1/description.json | 20 --
.../filters-jvm/thresholdDetection1/expected.csv | 11 --
.../filters-jvm/thresholdDetection1/input.csv | 11 --
.../booleanCounter1/description.json | 7 -
.../booleanCounter1/expected.csv | 6 -
.../transformation-jvm/booleanCounter1/input.csv | 11 --
.../booleanCounter2/description.json | 15 --
.../booleanCounter2/expected.csv | 8 -
.../transformation-jvm/booleanCounter2/input.csv | 11 --
.../booleanInverter1/description.json | 10 -
.../booleanInverter1/expected.csv | 11 --
.../transformation-jvm/booleanInverter1/input.csv | 11 --
.../countArray1/description.json | 6 -
.../transformation-jvm/countArray1/expected.csv | 5 -
.../transformation-jvm/countArray1/input.json | 6 -
.../fieldHasher1/description.json | 11 --
.../transformation-jvm/fieldHasher1/expected.csv | 3 -
.../transformation-jvm/fieldHasher1/input.csv | 3 -
.../fieldHasher2/description.json | 11 --
.../transformation-jvm/fieldHasher2/expected.csv | 3 -
.../transformation-jvm/fieldHasher2/input.csv | 5 -
.../fieldMapper1/description.json | 8 -
.../transformation-jvm/fieldMapper1/expected.csv | 3 -
.../transformation-jvm/fieldMapper1/input.csv | 5 -
.../fieldRenamer1/description.json | 7 -
.../transformation-jvm/fieldRenamer1/expected.csv | 11 --
.../transformation-jvm/fieldRenamer1/input.csv | 11 --
.../signalEdgeFilter1/description.json | 13 --
.../signalEdgeFilter1/expected.csv | 6 -
.../transformation-jvm/signalEdgeFilter1/input.csv | 11 --
.../splitArray1/description.json | 11 --
.../transformation-jvm/splitArray1/expected.csv | 3 -
.../transformation-jvm/splitArray1/input.json | 4 -
ui/cypress/plugins/index.ts | 17 +-
98 files changed, 1075 insertions(+), 935 deletions(-)
diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/MathOpProcessorTest.java b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/MathOpProcessorTest.java
index fb2a1d5666..1a54cc96a3 100644
--- a/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/MathOpProcessorTest.java
+++ b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/MathOpProcessorTest.java
@@ -118,4 +118,64 @@ public class MathOpProcessorTest{
testExecutor.run(inputEvents, outputEvents);
}
-}
\ No newline at end of file
+
+ @Test
+ public void math1() {
+ executeFixtureTest(
+ "+",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 2.0d, "temperature2", 3.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 3.0d, "temperature2", 4.0d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 2.0d, "temperature2", 3.0d, "calculationResult", 5.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 3.0d, "temperature2", 4.0d, "calculationResult", 7.0d)
+ )
+ );
+ }
+
+ @Test
+ public void math2() {
+ executeFixtureTest(
+ "/",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 4.0d, "temperature2", 4.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 100.0d, "temperature2", 5.0d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 4.0d, "temperature2", 4.0d, "calculationResult", 1.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 100.0d, "temperature2", 5.0d, "calculationResult", 20.0d)
+ )
+ );
+ }
+
+ @Test
+ public void math3() {
+ executeFixtureTest(
+ "*",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 4.0d, "temperature2", 2.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 3.5d, "temperature2", 5.0d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 4.0d, "temperature2", 2.0d, "calculationResult", 8.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 3.5d, "temperature2", 5.0d, "calculationResult", 17.5d)
+ )
+ );
+ }
+
+ private void executeFixtureTest(
+ String operation,
+ List<Map<String, Object>> inputEvents,
+ List<Map<String, Object>> outputEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(MathOpProcessor.LEFT_OPERAND, "temperature1")
+ .configWithDefaultPrefix(MathOpProcessor.RIGHT_OPERAND, "temperature2")
+ .config(MathOpProcessor.OPERATION, operation)
+ .build();
+
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(inputEvents, outputEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/staticmathop/StaticMathOpProcessorTest.java b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/staticmathop/StaticMathOpProcessorTest.java
new file mode 100644
index 0000000000..ca9f5df667
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/math/staticmathop/StaticMathOpProcessorTest.java
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.enricher.jvm.processor.math.staticmathop;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class StaticMathOpProcessorTest {
+
+ private StaticMathOpProcessor processor;
+
+ @BeforeEach
+ void setUp() {
+ processor = new StaticMathOpProcessor();
+ }
+
+ @Test
+ void staticmath1() {
+ executeFixtureTest(
+ "*",
+ 5.0d,
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 4.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 3.5d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 20.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 17.5d)
+ )
+ );
+ }
+
+ @Test
+ void staticmath2() {
+ executeFixtureTest(
+ "/",
+ 1.5d,
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 6.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 3.0d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 4.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 2.0d)
+ )
+ );
+ }
+
+ private void executeFixtureTest(
+ String operation,
+ double rightOperand,
+ List<Map<String, Object>> inputEvents,
+ List<Map<String, Object>> outputEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix("leftOperand", "temperature1")
+ .config("rightOperandValue", rightOperand)
+ .config("operation", operation)
+ .build();
+
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(inputEvents, outputEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/trigonometry/TrigonometryProcessorTest.java b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/trigonometry/TrigonometryProcessorTest.java
new file mode 100644
index 0000000000..67d90e93df
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/trigonometry/TrigonometryProcessorTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.enricher.jvm.processor.trigonometry;
+
+import org.apache.streampipes.test.executors.Approx;
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class TrigonometryProcessorTest {
+
+ private TrigonometryProcessor processor;
+
+ @BeforeEach
+ void setUp() {
+ processor = new TrigonometryProcessor();
+ }
+
+ @Test
+ void trigonometry1() {
+ executeFixtureTest(
+ "sin",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 90.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 180.0d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 90.0d,
+ "trigonometryResult", new Approx(0.8939966636005579d, 0.0000000001d)),
+ Map.of("timestamp", 1623871500059L, "temperature1", 180.0d,
+ "trigonometryResult", new Approx(-0.8011526357338304d, 0.0000000001d))
+ )
+ );
+ }
+
+ @Test
+ void trigonometry2() {
+ executeFixtureTest(
+ "cos",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 120.0d),
+ Map.of("timestamp", 1623871500059L, "temperature1", 150.0d)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "temperature1", 120.0d,
+ "trigonometryResult", new Approx(0.8141809705265618d, 0.0000000001d)),
+ Map.of("timestamp", 1623871500059L, "temperature1", 150.0d,
+ "trigonometryResult", new Approx(0.6992508064783751d, 0.0000000001d))
+ )
+ );
+ }
+
+ private void executeFixtureTest(
+ String operation,
+ List<Map<String, Object>> inputEvents,
+ List<Map<String, Object>> outputEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix("operand", "temperature1")
+ .config("operation", operation)
+ .build();
+
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(inputEvents, outputEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/valuechange/ValueChangeProcessorTest.java b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/valuechange/ValueChangeProcessorTest.java
new file mode 100644
index 0000000000..ecbec67bce
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-enricher-jvm/src/test/java/org/apache/streampipes/processors/enricher/jvm/processor/valuechange/ValueChangeProcessorTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.enricher.jvm.processor.valuechange;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class ValueChangeProcessorTest {
+
+ @Test
+ void valueChange1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix("change-value-mapping", "numberlist")
+ .config("from-property-value", 3.0f)
+ .config("to-property-value", 4.0f)
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "numberlist", 2.0f),
+ Map.of("timestamp", 1623871500059L, "numberlist", 3.0f),
+ Map.of("timestamp", 1623871501064L, "numberlist", 4.0f),
+ Map.of("timestamp", 1623871502070L, "numberlist", 5.0f),
+ Map.of("timestamp", 1623871503078L, "numberlist", 2.0f),
+ Map.of("timestamp", 1623871504082L, "numberlist", 3.0f),
+ Map.of("timestamp", 1623871505084L, "numberlist", 4.0f),
+ Map.of("timestamp", 1623871506086L, "numberlist", 5.0f),
+ Map.of("timestamp", 1623871507091L, "numberlist", 6.0f),
+ Map.of("timestamp", 1623871508093L, "numberlist", 7.0f)
+ );
+
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "numberlist", 2.0f, "isChanged", false),
+ Map.of("timestamp", 1623871500059L, "numberlist", 3.0f, "isChanged", false),
+ Map.of("timestamp", 1623871501064L, "numberlist", 4.0f, "isChanged", true),
+ Map.of("timestamp", 1623871502070L, "numberlist", 5.0f, "isChanged", false),
+ Map.of("timestamp", 1623871503078L, "numberlist", 2.0f, "isChanged", false),
+ Map.of("timestamp", 1623871504082L, "numberlist", 3.0f, "isChanged", false),
+ Map.of("timestamp", 1623871505084L, "numberlist", 4.0f, "isChanged", true),
+ Map.of("timestamp", 1623871506086L, "numberlist", 5.0f, "isChanged", false),
+ Map.of("timestamp", 1623871507091L, "numberlist", 6.0f, "isChanged", false),
+ Map.of("timestamp", 1623871508093L, "numberlist", 7.0f, "isChanged", false)
+ );
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new ValueChangeProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/booleanfilter/TestBooleanFilterProcessor.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/booleanfilter/TestBooleanFilterProcessor.java
index a6d1a73727..f6cb56254d 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/booleanfilter/TestBooleanFilterProcessor.java
+++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/booleanfilter/TestBooleanFilterProcessor.java
@@ -22,6 +22,7 @@ import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
import org.apache.streampipes.test.executors.TestConfiguration;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
@@ -94,4 +95,73 @@ public class TestBooleanFilterProcessor {
Collections.emptyList())
);
}
+
+ @Test
+ public void booleanFilter1() {
+ executeFixtureTest(
+ "randomboolean",
+ "True",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomboolean", false),
+ Map.of("timestamp", 1623871500059L, "randomboolean", false),
+ Map.of("timestamp", 1623871501064L, "randomboolean", true),
+ Map.of("timestamp", 1623871502070L, "randomboolean", false),
+ Map.of("timestamp", 1623871503078L, "randomboolean", true),
+ Map.of("timestamp", 1623871504082L, "randomboolean", false),
+ Map.of("timestamp", 1623871505084L, "randomboolean", true),
+ Map.of("timestamp", 1623871506086L, "randomboolean", false),
+ Map.of("timestamp", 1623871507091L, "randomboolean", true),
+ Map.of("timestamp", 1623871508093L, "randomboolean", true)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871501064L, "randomboolean", true),
+ Map.of("timestamp", 1623871503078L, "randomboolean", true),
+ Map.of("timestamp", 1623871505084L, "randomboolean", true),
+ Map.of("timestamp", 1623871507091L, "randomboolean", true),
+ Map.of("timestamp", 1623871508093L, "randomboolean", true)
+ )
+ );
+ }
+
+ @Test
+ public void booleanFilter2() {
+ executeFixtureTest(
+ "randomboolean",
+ "False",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomboolean", false),
+ Map.of("timestamp", 1623871500059L, "randomboolean", false),
+ Map.of("timestamp", 1623871501064L, "randomboolean", true),
+ Map.of("timestamp", 1623871502070L, "randomboolean", false),
+ Map.of("timestamp", 1623871503078L, "randomboolean", true),
+ Map.of("timestamp", 1623871504082L, "randomboolean", false),
+ Map.of("timestamp", 1623871505084L, "randomboolean", true),
+ Map.of("timestamp", 1623871506086L, "randomboolean", false),
+ Map.of("timestamp", 1623871507091L, "randomboolean", true),
+ Map.of("timestamp", 1623871508093L, "randomboolean", true)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomboolean", false),
+ Map.of("timestamp", 1623871500059L, "randomboolean", false),
+ Map.of("timestamp", 1623871502070L, "randomboolean", false),
+ Map.of("timestamp", 1623871504082L, "randomboolean", false),
+ Map.of("timestamp", 1623871506086L, "randomboolean", false)
+ )
+ );
+ }
+
+ private void executeFixtureTest(
+ String fieldName,
+ String valueToKeep,
+ List<Map<String, Object>> events,
+ List<Map<String, Object>> outputEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(BooleanFilterProcessor.BOOLEAN_MAPPING, fieldName)
+ .config(BooleanFilterProcessor.VALUE, valueToKeep)
+ .build();
+
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(events, outputEvents);
+ }
}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/limit/RateLimitProcessorTest.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/limit/RateLimitProcessorTest.java
new file mode 100644
index 0000000000..eeefb3b84d
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/limit/RateLimitProcessorTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.filters.jvm.processor.limit;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class RateLimitProcessorTest {
+
+ @Test
+ void rateLimit1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .config("grouping-enabled", "False")
+ .configWithDefaultPrefix("grouping-field", "randomnumber")
+ .config("window-type", "length-window")
+ .config("length-window-size", 5)
+ .config("event-selection", "Last")
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871490000L, "randomnumber", 62.0d),
+ Map.of("timestamp", 1623871491000L, "randomnumber", 46.0d),
+ Map.of("timestamp", 1623871492000L, "randomnumber", 41.0d),
+ Map.of("timestamp", 1623871493000L, "randomnumber", 41.0d),
+ Map.of("timestamp", 1623871494000L, "randomnumber", 22.0d),
+ Map.of("timestamp", 1623871495000L, "randomnumber", 56.0d),
+ Map.of("timestamp", 1623871496000L, "randomnumber", 95.0d),
+ Map.of("timestamp", 1623871497000L, "randomnumber", 77.0d),
+ Map.of("timestamp", 1623871498000L, "randomnumber", 85.0d),
+ Map.of("timestamp", 1623871499000L, "randomnumber", 26.0d),
+ Map.of("timestamp", 1623871500000L, "randomnumber", 21.0d)
+ );
+
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871494000L, "randomnumber", 22.0d),
+ Map.of("timestamp", 1623871499000L, "randomnumber", 26.0d)
+ );
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new RateLimitProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/numericalfilter/NumericalFilterProcessorTest.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/numericalfilter/NumericalFilterProcessorTest.java
index ed08eecd9f..5175d4bc02 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/numericalfilter/NumericalFilterProcessorTest.java
+++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/numericalfilter/NumericalFilterProcessorTest.java
@@ -80,4 +80,37 @@ public class NumericalFilterProcessorTest {
testExecutor.run(inputEvents, outputEvents);
}
-}
\ No newline at end of file
+ @Test
+ public void numericalFilter1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(NumericalFilterProcessor.NUMBER_MAPPING, "randomnumber")
+ .config(NumericalFilterProcessor.VALUE, 50.0d)
+ .config(NumericalFilterProcessor.OPERATION, ">")
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "randomnumber", 62.0d),
+ Map.of("timestamp", 1623871500059L, "randomnumber", 46.0d),
+ Map.of("timestamp", 1623871501064L, "randomnumber", 41.0d),
+ Map.of("timestamp", 1623871502070L, "randomnumber", 41.0d),
+ Map.of("timestamp", 1623871503078L, "randomnumber", 22.0d),
+ Map.of("timestamp", 1623871504082L, "randomnumber", 56.0d),
+ Map.of("timestamp", 1623871505084L, "randomnumber", 95.0d),
+ Map.of("timestamp", 1623871506086L, "randomnumber", 77.0d),
+ Map.of("timestamp", 1623871507091L, "randomnumber", 85.0d),
+ Map.of("timestamp", 1623871508093L, "randomnumber", 22.0d)
+ );
+
+ List<Map<String, Object>> outputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "randomnumber", 62.0d),
+ Map.of("timestamp", 1623871504082L, "randomnumber", 56.0d),
+ Map.of("timestamp", 1623871505084L, "randomnumber", 95.0d),
+ Map.of("timestamp", 1623871506086L, "randomnumber", 77.0d),
+ Map.of("timestamp", 1623871507091L, "randomnumber", 85.0d)
+ );
+
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(inputEvents, outputEvents);
+ }
+
+}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
index 3bb6a98238..be831d1385 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
+++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
@@ -29,32 +29,59 @@ class TestProjectionProcessor {
@Test
- public void test() {
+ public void projection1() {
var configuration = TestConfiguration
.builder()
- .customOutputStrategy(List.of("field1", "field2"))
+ .customOutputStrategy(List.of("timestamp", "a"))
.build();
List<Map<String, Object>> events = List.of(
Map.of(
- "field1", "value1",
- "field2", "value2",
- "field3", "ignoredValue"
+ "timestamp", 1623871499055L,
+ "remove", 62.0d,
+ "a", "a"
),
Map.of(
- "field1", "value3",
- "field2", "value4",
- "field3", "ignoredValue"
+ "timestamp", 1623871504082L,
+ "remove", 56.0d,
+ "a", "a"
+ ),
+ Map.of(
+ "timestamp", 1623871505084L,
+ "remove", 95.0d,
+ "a", "a"
+ ),
+ Map.of(
+ "timestamp", 1623871506086L,
+ "remove", 77.0d,
+ "a", "a"
+ ),
+ Map.of(
+ "timestamp", 1623871507091L,
+ "remove", 85.0d,
+ "a", "a"
)
);
List<Map<String, Object>> outputEvents = List.of(
Map.of(
- "field1", "value1",
- "field2", "value2"
+ "timestamp", 1623871499055L,
+ "a", "a"
+ ),
+ Map.of(
+ "timestamp", 1623871504082L,
+ "a", "a"
+ ),
+ Map.of(
+ "timestamp", 1623871505084L,
+ "a", "a"
+ ),
+ Map.of(
+ "timestamp", 1623871506086L,
+ "a", "a"
),
Map.of(
- "field1", "value3",
- "field2", "value4"
+ "timestamp", 1623871507091L,
+ "a", "a"
)
);
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/textfilter/TestTextFilterProcessor.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/textfilter/TestTextFilterProcessor.java
index d283eb04ce..03e8972701 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/textfilter/TestTextFilterProcessor.java
+++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/textfilter/TestTextFilterProcessor.java
@@ -22,6 +22,7 @@ import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
import org.apache.streampipes.test.executors.TestConfiguration;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
@@ -113,4 +114,74 @@ public class TestTextFilterProcessor {
)
);
}
+
+ @Test
+ public void textFilter1() {
+ executeFixtureTest(
+ "randomchar",
+ StringOperator.MATCHES,
+ "c",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomchar", "a"),
+ Map.of("timestamp", 1623871500059L, "randomchar", "b"),
+ Map.of("timestamp", 1623871501064L, "randomchar", "c"),
+ Map.of("timestamp", 1623871502070L, "randomchar", "a"),
+ Map.of("timestamp", 1623871503078L, "randomchar", "b"),
+ Map.of("timestamp", 1623871504082L, "randomchar", "c"),
+ Map.of("timestamp", 1623871505084L, "randomchar", "a"),
+ Map.of("timestamp", 1623871506086L, "randomchar", "b"),
+ Map.of("timestamp", 1623871507091L, "randomchar", "c"),
+ Map.of("timestamp", 1623871508093L, "randomchar", "a")
+ ),
+ List.of(
+ Map.of("timestamp", 1623871501064L, "randomchar", "c"),
+ Map.of("timestamp", 1623871504082L, "randomchar", "c"),
+ Map.of("timestamp", 1623871507091L, "randomchar", "c")
+ )
+ );
+ }
+
+ @Test
+ public void textFilter2() {
+ executeFixtureTest(
+ "randomchar",
+ StringOperator.CONTAINS,
+ "app",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomchar", "apple"),
+ Map.of("timestamp", 1623871500059L, "randomchar", "banana"),
+ Map.of("timestamp", 1623871501064L, "randomchar", "computer"),
+ Map.of("timestamp", 1623871502070L, "randomchar", "apple"),
+ Map.of("timestamp", 1623871503078L, "randomchar", "banana"),
+ Map.of("timestamp", 1623871504082L, "randomchar", "computer"),
+ Map.of("timestamp", 1623871505084L, "randomchar", "apple"),
+ Map.of("timestamp", 1623871506086L, "randomchar", "banana"),
+ Map.of("timestamp", 1623871507091L, "randomchar", "computer"),
+ Map.of("timestamp", 1623871508093L, "randomchar", "apple")
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomchar", "apple"),
+ Map.of("timestamp", 1623871502070L, "randomchar", "apple"),
+ Map.of("timestamp", 1623871505084L, "randomchar", "apple"),
+ Map.of("timestamp", 1623871508093L, "randomchar", "apple")
+ )
+ );
+ }
+
+ private void executeFixtureTest(
+ String fieldName,
+ StringOperator operation,
+ String keyword,
+ List<Map<String, Object>> inputEvents,
+ List<Map<String, Object>> outputEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(TextFilterProcessor.MAPPING_PROPERTY_ID, fieldName)
+ .config(TextFilterProcessor.OPERATION_ID, operation)
+ .config(TextFilterProcessor.KEYWORD_ID, keyword)
+ .build();
+
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(inputEvents, outputEvents);
+ }
}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/threshold/TestThresholdDetectionProcessor.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/threshold/TestThresholdDetectionProcessor.java
index ec73a64611..c4d02b7e2c 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/threshold/TestThresholdDetectionProcessor.java
+++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/threshold/TestThresholdDetectionProcessor.java
@@ -123,9 +123,44 @@ class TestThresholdDetectionProcessor {
executeTest(configuration, inputEvent, expectedEvents);
}
+ @Test
+ void thresholdDetection1() {
+ var configuration = createConfiguration(">", 50.0, "randomnumber");
+ var inputEvents = List.of(
+ event("timestamp", 1623871499055L, "randomnumber", 62.0d),
+ event("timestamp", 1623871500059L, "randomnumber", 46.0d),
+ event("timestamp", 1623871501064L, "randomnumber", 41.0d),
+ event("timestamp", 1623871502070L, "randomnumber", 41.0d),
+ event("timestamp", 1623871503078L, "randomnumber", 22.0d),
+ event("timestamp", 1623871504082L, "randomnumber", 56.0d),
+ event("timestamp", 1623871505084L, "randomnumber", 95.0d),
+ event("timestamp", 1623871506086L, "randomnumber", 77.0d),
+ event("timestamp", 1623871507091L, "randomnumber", 85.0d),
+ event("timestamp", 1623871508093L, "randomnumber", 22.0d)
+ );
+ var expectedEvents = List.of(
+ event("timestamp", 1623871499055L, "randomnumber", 62.0d, ThresholdDetectionProcessor.RESULT_FIELD, true),
+ event("timestamp", 1623871500059L, "randomnumber", 46.0d, ThresholdDetectionProcessor.RESULT_FIELD, false),
+ event("timestamp", 1623871501064L, "randomnumber", 41.0d, ThresholdDetectionProcessor.RESULT_FIELD, false),
+ event("timestamp", 1623871502070L, "randomnumber", 41.0d, ThresholdDetectionProcessor.RESULT_FIELD, false),
+ event("timestamp", 1623871503078L, "randomnumber", 22.0d, ThresholdDetectionProcessor.RESULT_FIELD, false),
+ event("timestamp", 1623871504082L, "randomnumber", 56.0d, ThresholdDetectionProcessor.RESULT_FIELD, true),
+ event("timestamp", 1623871505084L, "randomnumber", 95.0d, ThresholdDetectionProcessor.RESULT_FIELD, true),
+ event("timestamp", 1623871506086L, "randomnumber", 77.0d, ThresholdDetectionProcessor.RESULT_FIELD, true),
+ event("timestamp", 1623871507091L, "randomnumber", 85.0d, ThresholdDetectionProcessor.RESULT_FIELD, true),
+ event("timestamp", 1623871508093L, "randomnumber", 22.0d, ThresholdDetectionProcessor.RESULT_FIELD, false)
+ );
+
+ executeTest(configuration, inputEvents, expectedEvents);
+ }
+
private TestConfiguration createConfiguration(String operation, double value) {
+ return createConfiguration(operation, value, FIELD_NAME);
+ }
+
+ private TestConfiguration createConfiguration(String operation, double value, String fieldName) {
return TestConfiguration.builder()
- .configWithDefaultPrefix(ThresholdDetectionProcessor.NUMBER_MAPPING, FIELD_NAME)
+ .configWithDefaultPrefix(ThresholdDetectionProcessor.NUMBER_MAPPING, fieldName)
.config(ThresholdDetectionProcessor.OPERATION, operation)
.config(ThresholdDetectionProcessor.VALUE, value)
.build();
@@ -139,6 +174,16 @@ class TestThresholdDetectionProcessor {
return List.of(Map.of(FIELD_NAME, value, ThresholdDetectionProcessor.RESULT_FIELD, thresholdDetected));
}
+ private Map<String, Object> event(Object... keyValuePairs) {
+ var event = new java.util.LinkedHashMap<String, Object>();
+
+ for (int i = 0; i < keyValuePairs.length; i += 2) {
+ event.put((String) keyValuePairs[i], keyValuePairs[i + 1]);
+ }
+
+ return event;
+ }
+
private void executeTest(
TestConfiguration configuration,
List<Map<String, Object>> inputEvent,
diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/array/count/CountArrayProcessorTest.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/array/count/CountArrayProcessorTest.java
new file mode 100644
index 0000000000..93365b0de0
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/array/count/CountArrayProcessorTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.transformation.jvm.processor.array.count;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class CountArrayProcessorTest {
+
+ @Test
+ void countArray1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(CountArrayProcessor.ARRAY_FIELD, "arrayProperty")
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "arrayProperty", List.of(1, 2, 4, 4)),
+ Map.of("timestamp", 1623871500059L, "arrayProperty", List.of(1, 4)),
+ Map.of("timestamp", 1623871507091L, "arrayProperty", List.of(1, 3, 3, 3, 4)),
+ Map.of("timestamp", 1623871508093L, "arrayProperty", List.of(1))
+ );
+
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "arrayProperty", List.of(1, 2, 4, 4), CountArrayProcessor.COUNT_NAME, 4),
+ Map.of("timestamp", 1623871500059L, "arrayProperty", List.of(1, 4), CountArrayProcessor.COUNT_NAME, 2),
+ Map.of("timestamp", 1623871507091L, "arrayProperty", List.of(1, 3, 3, 3, 4), CountArrayProcessor.COUNT_NAME, 5),
+ Map.of("timestamp", 1623871508093L, "arrayProperty", List.of(1), CountArrayProcessor.COUNT_NAME, 1)
+ );
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new CountArrayProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/array/split/SplitArrayProcessorTest.java
similarity index 50%
copy from streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
copy to streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/array/split/SplitArrayProcessorTest.java
index 3bb6a98238..86fbe65507 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/array/split/SplitArrayProcessorTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*
*/
-package org.apache.streampipes.processors.filters.jvm.processor.projection;
+package org.apache.streampipes.processors.transformation.jvm.processor.array.split;
import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
import org.apache.streampipes.test.executors.TestConfiguration;
@@ -25,42 +25,29 @@ import org.junit.jupiter.api.Test;
import java.util.List;
import java.util.Map;
-class TestProjectionProcessor {
-
+class SplitArrayProcessorTest {
@Test
- public void test() {
- var configuration = TestConfiguration
- .builder()
- .customOutputStrategy(List.of("field1", "field2"))
+ void splitArray1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(SplitArrayProcessor.ARRAY_FIELD_ID, "arrayProperty")
+ .config(SplitArrayProcessor.KEEP_PROPERTIES_ID, List.of("::timestamp"))
.build();
- List<Map<String, Object>> events = List.of(
- Map.of(
- "field1", "value1",
- "field2", "value2",
- "field3", "ignoredValue"
- ),
- Map.of(
- "field1", "value3",
- "field2", "value4",
- "field3", "ignoredValue"
- )
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871500059L, "arrayProperty", List.of(1, 4)),
+ Map.of("timestamp", 1623871508093L, "arrayProperty", List.of(1))
);
- List<Map<String, Object>> outputEvents = List.of(
- Map.of(
- "field1", "value1",
- "field2", "value2"
- ),
- Map.of(
- "field1", "value3",
- "field2", "value4"
- )
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871500059L, SplitArrayProcessor.VALUE, 1),
+ Map.of("timestamp", 1623871500059L, SplitArrayProcessor.VALUE, 4),
+ Map.of("timestamp", 1623871508093L, SplitArrayProcessor.VALUE, 1)
);
- var testExecutor = new ProcessingElementTestExecutor(new ProjectionProcessor(), configuration);
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new SplitArrayProcessor(), configuration);
- testExecutor.run(events, outputEvents);
+ testExecutor.run(inputEvents, expectedEvents);
}
-
}
diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/counter/TestBooleanCounterProcessor.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/counter/TestBooleanCounterProcessor.java
index a9fb7f39c8..a20e438b54 100644
--- a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/counter/TestBooleanCounterProcessor.java
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/counter/TestBooleanCounterProcessor.java
@@ -15,158 +15,91 @@
* limitations under the License.
*
*/
-
package org.apache.streampipes.processors.transformation.jvm.processor.booloperator.counter;
-import org.apache.streampipes.commons.exceptions.SpRuntimeException;
-import org.apache.streampipes.extensions.api.pe.routing.SpOutputCollector;
-import org.apache.streampipes.messaging.InternalEventProcessor;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.model.runtime.Event;
-import org.apache.streampipes.model.runtime.EventFactory;
-import org.apache.streampipes.model.runtime.SchemaInfo;
-import org.apache.streampipes.model.runtime.SourceInfo;
-import org.apache.streampipes.model.staticproperty.MappingPropertyUnary;
-import org.apache.streampipes.model.staticproperty.OneOfStaticProperty;
-import org.apache.streampipes.test.generator.EventStreamGenerator;
-import org.apache.streampipes.test.generator.InvocationGraphGenerator;
-import org.apache.streampipes.test.generator.grounding.EventGroundingGenerator;
-import org.apache.streampipes.wrapper.params.compat.ProcessorParams;
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.stream.Stream;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+class TestBooleanCounterProcessor {
-public class TestBooleanCounterProcessor {
- private static final Logger LOG = LoggerFactory.getLogger(TestBooleanCounterProcessor.class);
+ private BooleanCounterProcessor processor;
- static Stream<Arguments> data() {
- return Stream.of(
- Arguments.of("Test", "BOTH", Arrays.asList(false, true), 1),
- Arguments.of("Test", "BOTH", Arrays.asList(false, true, false), 2),
- Arguments.of("Test", "BOTH", Arrays.asList(false), 0),
- Arguments.of("Test", "TRUE -> FALSE", Arrays.asList(false, true, false, false, true), 2),
- Arguments.of("Test", "TRUE -> FALSE", Arrays.asList(true, false), 1),
- Arguments.of("Test", "TRUE -> FALSE", Arrays.asList(false), 1),
- Arguments.of("Test", "FALSE -> TRUE", Arrays.asList(false), 0),
- Arguments.of("Test", "FALSE -> TRUE", Arrays.asList(false, false, true), 1),
- Arguments.of("Test", "FALSE -> TRUE", Arrays.asList(false, false, true), 1),
- Arguments.of("Test", "FALSE -> TRUE", Arrays.asList(false, true, true, false), 1)
- );
+ @BeforeEach
+ void setUp() {
+ processor = new BooleanCounterProcessor();
}
- // /**
-// * flankUp defines which boolean changes should be counted
-// * 0: BOTH
-// * 1: TRUE -> FALSE
-// * 2: FALSE -> TRUE
-// */
- @ParameterizedTest
- @MethodSource("data")
- public void testBooleanCounter(
- String invertFieldName,
- String flankUp,
- List<Boolean> eventBooleans,
- Integer expectedBooleanCount
- ) {
- BooleanCounterProcessor booleanCounter = new BooleanCounterProcessor();
- DataProcessorDescription originalGraph = booleanCounter.declareConfig().getDescription();
- originalGraph.setSupportedGrounding(EventGroundingGenerator.makeDummyGrounding());
-
- DataProcessorInvocation graph =
- InvocationGraphGenerator.makeEmptyInvocation(originalGraph);
-
- graph.setInputStreams(Collections
- .singletonList(EventStreamGenerator
- .makeStreamWithProperties(Collections.singletonList(invertFieldName))));
-
- graph.setOutputStream(EventStreamGenerator.makeStreamWithProperties(Collections.singletonList(invertFieldName)));
-
- graph.getOutputStream().getEventGrounding().getTransportProtocol().getTopicDefinition()
- .setActualTopicName("output-topic");
-
- graph.getStaticProperties().stream()
- .filter(p -> p instanceof MappingPropertyUnary)
- .map((p -> (MappingPropertyUnary) p))
- .filter(p -> p.getInternalName().equals(BooleanCounterProcessor.FIELD_ID))
- .findFirst().get().setSelectedProperty("s0::" + invertFieldName);
- ProcessorParams params = new ProcessorParams(graph);
- params.extractor().getStaticPropertyByName("flank", OneOfStaticProperty.class).getOptions()
- .stream().filter(ot -> ot.getName().equals(flankUp)).findFirst()
- .get().setSelected(true);
-
-
- SpOutputCollector spOut = new SpOutputCollector() {
- @Override
- public void collect(Event event) {}
- @Override
- public void registerConsumer(String routeId, InternalEventProcessor<Map<String, Object>> consumer) {}
- @Override
- public void unregisterConsumer(String routeId) {}
- @Override
- public void connect() throws SpRuntimeException {}
- @Override
- public void disconnect() throws SpRuntimeException {}
- };
-
- booleanCounter.onPipelineStarted(params, spOut, null);
- Integer counter = sendEvents(booleanCounter, spOut, eventBooleans, invertFieldName);
- LOG.info("Expected match count is {}", expectedBooleanCount);
- LOG.info("Actual match count is {}", counter);
- assertEquals(expectedBooleanCount, counter);
+ @Test
+ void booleanCounter1() {
+ executeFixtureTest(
+ "booleanToCount",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "booleanToCount", true),
+ Map.of("timestamp", 1623871500059L, "booleanToCount", true),
+ Map.of("timestamp", 1623871501064L, "booleanToCount", true),
+ Map.of("timestamp", 1623871502070L, "booleanToCount", false),
+ Map.of("timestamp", 1623871503078L, "booleanToCount", false),
+ Map.of("timestamp", 1623871504082L, "booleanToCount", false),
+ Map.of("timestamp", 1623871505084L, "booleanToCount", true),
+ Map.of("timestamp", 1623871506086L, "booleanToCount", true),
+ Map.of("timestamp", 1623871507091L, "booleanToCount", false),
+ Map.of("timestamp", 1623871508093L, "booleanToCount", true)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "booleanToCount", true, "counter", 1),
+ Map.of("timestamp", 1623871502070L, "booleanToCount", false, "counter", 2),
+ Map.of("timestamp", 1623871505084L, "booleanToCount", true, "counter", 3),
+ Map.of("timestamp", 1623871507091L, "booleanToCount", false, "counter", 4),
+ Map.of("timestamp", 1623871508093L, "booleanToCount", true, "counter", 5)
+ )
+ );
}
- private Integer sendEvents(BooleanCounterProcessor booleanCounter, SpOutputCollector spOut,
- List<Boolean> eventBooleans, String invertFieldName) {
- int counter = 0;
- List<Event> events = makeEvents(eventBooleans, invertFieldName);
- for (Event event : events) {
- LOG.info("Sending event with value "
- + event.getFieldBySelector("s0::" + invertFieldName).getAsPrimitive().getAsBoolean());
- booleanCounter.onEvent(event, spOut);
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- try {
- counter = event.getFieldBySelector(BooleanCounterProcessor.COUNT_FIELD_RUNTIME_NAME)
- .getAsPrimitive()
- .getAsInt();
- } catch (IllegalArgumentException e) {
-
- }
- }
-
- return counter;
+ @Test
+ void booleanCounter2() {
+ executeFixtureTest(
+ "randomboolean",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "randomboolean", false),
+ Map.of("timestamp", 1623871500059L, "randomboolean", false),
+ Map.of("timestamp", 1623871501064L, "randomboolean", true),
+ Map.of("timestamp", 1623871502070L, "randomboolean", false),
+ Map.of("timestamp", 1623871503078L, "randomboolean", true),
+ Map.of("timestamp", 1623871504082L, "randomboolean", false),
+ Map.of("timestamp", 1623871505084L, "randomboolean", true),
+ Map.of("timestamp", 1623871506086L, "randomboolean", false),
+ Map.of("timestamp", 1623871507091L, "randomboolean", true),
+ Map.of("timestamp", 1623871508093L, "randomboolean", true)
+ ),
+ List.of(
+ Map.of("timestamp", 1623871501064L, "randomboolean", true, "counter", 1),
+ Map.of("timestamp", 1623871502070L, "randomboolean", false, "counter", 2),
+ Map.of("timestamp", 1623871503078L, "randomboolean", true, "counter", 3),
+ Map.of("timestamp", 1623871504082L, "randomboolean", false, "counter", 4),
+ Map.of("timestamp", 1623871505084L, "randomboolean", true, "counter", 5),
+ Map.of("timestamp", 1623871506086L, "randomboolean", false, "counter", 6),
+ Map.of("timestamp", 1623871507091L, "randomboolean", true, "counter", 7)
+ )
+ );
}
- private List<Event> makeEvents(List<Boolean> eventBooleans, String invertFieldName) {
- List<Event> events = new ArrayList<>();
- for (Boolean eventSetting : eventBooleans) {
- events.add(makeEvent(eventSetting, invertFieldName));
- }
- return events;
- }
+ private void executeFixtureTest(
+ String fieldName,
+ List<Map<String, Object>> inputEvents,
+ List<Map<String, Object>> expectedEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(BooleanCounterProcessor.FIELD_ID, fieldName)
+ .config(BooleanCounterProcessor.FLANK_ID, "BOTH")
+ .build();
- private Event makeEvent(Boolean value, String invertFieldName) {
- Map<String, Object> map = new HashMap<>();
- map.put(invertFieldName, value);
- return EventFactory.fromMap(map,
- new SourceInfo("test" + "-topic", "s0"),
- new SchemaInfo(null, new ArrayList<>()));
+ ProcessingElementTestExecutor testExecutor = new ProcessingElementTestExecutor(processor, configuration);
+ testExecutor.run(inputEvents, expectedEvents);
}
}
diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/edge/SignalEdgeFilterProcessorTest.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/edge/SignalEdgeFilterProcessorTest.java
new file mode 100644
index 0000000000..bdf99337f5
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/edge/SignalEdgeFilterProcessorTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.transformation.jvm.processor.booloperator.edge;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class SignalEdgeFilterProcessorTest {
+
+ @Test
+ void signalEdgeFilter1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(SignalEdgeFilterProcessor.BOOLEAN_SIGNAL_FIELD, "booleanEdge")
+ .config(SignalEdgeFilterProcessor.FLANK_ID, SignalEdgeFilterProcessor.BOTH)
+ .config(SignalEdgeFilterProcessor.DELAY_ID, 0)
+ .config("event-selection-id", "Last")
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "booleanEdge", true),
+ Map.of("timestamp", 1623871500059L, "booleanEdge", true),
+ Map.of("timestamp", 1623871501064L, "booleanEdge", true),
+ Map.of("timestamp", 1623871502070L, "booleanEdge", false),
+ Map.of("timestamp", 1623871503078L, "booleanEdge", false),
+ Map.of("timestamp", 1623871504082L, "booleanEdge", false),
+ Map.of("timestamp", 1623871505084L, "booleanEdge", true),
+ Map.of("timestamp", 1623871506086L, "booleanEdge", true),
+ Map.of("timestamp", 1623871507091L, "booleanEdge", false),
+ Map.of("timestamp", 1623871508093L, "booleanEdge", true)
+ );
+
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "booleanEdge", true),
+ Map.of("timestamp", 1623871502070L, "booleanEdge", false),
+ Map.of("timestamp", 1623871505084L, "booleanEdge", true),
+ Map.of("timestamp", 1623871507091L, "booleanEdge", false),
+ Map.of("timestamp", 1623871508093L, "booleanEdge", true)
+ );
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new SignalEdgeFilterProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/inverter/BooleanInverterProcessorTest.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/inverter/BooleanInverterProcessorTest.java
new file mode 100644
index 0000000000..e14109230f
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/inverter/BooleanInverterProcessorTest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.transformation.jvm.processor.booloperator.inverter;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class BooleanInverterProcessorTest {
+
+ @Test
+ void booleanInverter1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix(BooleanInverterProcessor.INVERT_FIELD_ID, "booleanToInvert")
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871500059L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871501064L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871502070L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871503078L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871504082L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871505084L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871506086L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871507091L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871508093L, "booleanToInvert", true)
+ );
+
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871500059L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871501064L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871502070L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871503078L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871504082L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871505084L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871506086L, "booleanToInvert", false),
+ Map.of("timestamp", 1623871507091L, "booleanToInvert", true),
+ Map.of("timestamp", 1623871508093L, "booleanToInvert", false)
+ );
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new BooleanInverterProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/fieldrename/FiledRenameProcessorTest.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/fieldrename/FiledRenameProcessorTest.java
new file mode 100644
index 0000000000..5ec14992fc
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/fieldrename/FiledRenameProcessorTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.transformation.jvm.processor.fieldrename;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class FiledRenameProcessorTest {
+
+ @Test
+ void fieldRenamer1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix("convert-property", "count")
+ .config("field-name", "newname")
+ .build();
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "count", 122.0d),
+ Map.of("timestamp", 1623871500059L, "count", 123.0d),
+ Map.of("timestamp", 1623871501064L, "count", 124.0d),
+ Map.of("timestamp", 1623871502070L, "count", 125.0d),
+ Map.of("timestamp", 1623871503078L, "count", 126.0d),
+ Map.of("timestamp", 1623871504082L, "count", 127.0d),
+ Map.of("timestamp", 1623871505084L, "count", 128.0d),
+ Map.of("timestamp", 1623871506086L, "count", 129.0d),
+ Map.of("timestamp", 1623871507091L, "count", 130.0d),
+ Map.of("timestamp", 1623871508093L, "count", 131.0d)
+ );
+
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "newname", 122.0d),
+ Map.of("timestamp", 1623871500059L, "newname", 123.0d),
+ Map.of("timestamp", 1623871501064L, "newname", 124.0d),
+ Map.of("timestamp", 1623871502070L, "newname", 125.0d),
+ Map.of("timestamp", 1623871503078L, "newname", 126.0d),
+ Map.of("timestamp", 1623871504082L, "newname", 127.0d),
+ Map.of("timestamp", 1623871505084L, "newname", 128.0d),
+ Map.of("timestamp", 1623871506086L, "newname", 129.0d),
+ Map.of("timestamp", 1623871507091L, "newname", 130.0d),
+ Map.of("timestamp", 1623871508093L, "newname", 131.0d)
+ );
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new FiledRenameProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/hasher/FieldHasherProcessorTest.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/hasher/FieldHasherProcessorTest.java
new file mode 100644
index 0000000000..28ca0deff1
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/hasher/FieldHasherProcessorTest.java
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.streampipes.processors.transformation.jvm.processor.hasher;
+
+import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
+import org.apache.streampipes.test.executors.TestConfiguration;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Map;
+
+class FieldHasherProcessorTest {
+
+ @Test
+ void fieldHasher1() {
+ executeFixtureTest(
+ "SHA1",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "sensorId", "abc"),
+ Map.of("timestamp", 1623871500059L, "sensorId", "123")
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "sensorId", "a9993e364706816aba3e25717850c26c9cd0d89d"),
+ Map.of("timestamp", 1623871500059L, "sensorId", "40bd001563085fc35165329ea1ff5c5ecbdbbeef")
+ )
+ );
+ }
+
+ @Test
+ void fieldHasher2() {
+ executeFixtureTest(
+ "MD5",
+ List.of(
+ Map.of("timestamp", 1623871499055L, "sensorId", "abc"),
+ Map.of("timestamp", 1623871500059L, "sensorId", "123")
+ ),
+ List.of(
+ Map.of("timestamp", 1623871499055L, "sensorId", "900150983cd24fb0d6963f7d28e17f72"),
+ Map.of("timestamp", 1623871500059L, "sensorId", "202cb962ac59075b964b07152d234b70")
+ )
+ );
+ }
+
+ private void executeFixtureTest(
+ String algorithm,
+ List<Map<String, Object>> inputEvents,
+ List<Map<String, Object>> expectedEvents
+ ) {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .configWithDefaultPrefix("property-mapping", "sensorId")
+ .config("hash-algorithm", algorithm)
+ .build();
+
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new FieldHasherProcessor(), configuration);
+
+ testExecutor.run(inputEvents, expectedEvents);
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/mapper/FieldMapperProcessorTest.java
similarity index 52%
copy from streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
copy to streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/mapper/FieldMapperProcessorTest.java
index 3bb6a98238..c1ffc870f2 100644
--- a/streampipes-extensions/streampipes-processors-filters-jvm/src/test/java/org/apache/streampipes/processors/filters/jvm/processor/projection/TestProjectionProcessor.java
+++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/mapper/FieldMapperProcessorTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*
*/
-package org.apache.streampipes.processors.filters.jvm.processor.projection;
+package org.apache.streampipes.processors.transformation.jvm.processor.mapper;
import org.apache.streampipes.test.executors.ProcessingElementTestExecutor;
import org.apache.streampipes.test.executors.TestConfiguration;
@@ -25,42 +25,28 @@ import org.junit.jupiter.api.Test;
import java.util.List;
import java.util.Map;
-class TestProjectionProcessor {
-
+class FieldMapperProcessorTest {
@Test
- public void test() {
- var configuration = TestConfiguration
- .builder()
- .customOutputStrategy(List.of("field1", "field2"))
+ void fieldMapper1() {
+ TestConfiguration configuration = TestConfiguration.builder()
+ .config("replaceProperties", List.of("::value1", "::value2"))
+ .config("fieldName", "hashedField")
.build();
- List<Map<String, Object>> events = List.of(
- Map.of(
- "field1", "value1",
- "field2", "value2",
- "field3", "ignoredValue"
- ),
- Map.of(
- "field1", "value3",
- "field2", "value4",
- "field3", "ignoredValue"
- )
+
+ List<Map<String, Object>> inputEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "value1", "abc", "value2", "def"),
+ Map.of("timestamp", 1623871500059L, "value1", "123", "value2", "456")
);
- List<Map<String, Object>> outputEvents = List.of(
- Map.of(
- "field1", "value1",
- "field2", "value2"
- ),
- Map.of(
- "field1", "value3",
- "field2", "value4"
- )
+ List<Map<String, Object>> expectedEvents = List.of(
+ Map.of("timestamp", 1623871499055L, "hashedField", "e80b5017098950fc58aad83c8c14978e"),
+ Map.of("timestamp", 1623871500059L, "hashedField", "e10adc3949ba59abbe56e057f20f883e")
);
- var testExecutor = new ProcessingElementTestExecutor(new ProjectionProcessor(), configuration);
+ ProcessingElementTestExecutor testExecutor =
+ new ProcessingElementTestExecutor(new FieldMapperProcessor(), configuration);
- testExecutor.run(events, outputEvents);
+ testExecutor.run(inputEvents, expectedEvents);
}
-
}
diff --git a/streampipes-test-utils-executors/src/main/java/org/apache/streampipes/test/executors/ProcessingElementTestExecutor.java b/streampipes-test-utils-executors/src/main/java/org/apache/streampipes/test/executors/ProcessingElementTestExecutor.java
index 95d142a539..0d7c686364 100644
--- a/streampipes-test-utils-executors/src/main/java/org/apache/streampipes/test/executors/ProcessingElementTestExecutor.java
+++ b/streampipes-test-utils-executors/src/main/java/org/apache/streampipes/test/executors/ProcessingElementTestExecutor.java
@@ -36,6 +36,7 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -83,7 +84,7 @@ public class ProcessingElementTestExecutor {
List<Map<String, Object>> inputEvents,
List<Map<String, Object>> expectedOutputEvents
) {
-
+ var mockCollector = mock(SpOutputCollector.class);
// initialize the extractor with the provided configuration of the user input
var dataProcessorInvocation = getProcessorInvocation();
@@ -101,10 +102,9 @@ public class ProcessingElementTestExecutor {
when(mockParams.extractor()).thenReturn(extractor);
// calls the onPipelineStarted method of the processor to initialize it
- processor.onPipelineStarted(mockParams, null, null);
+ processor.onPipelineStarted(mockParams, mockCollector, null);
// mock the output collector to capture the output events and validate the results later
- var mockCollector = mock(SpOutputCollector.class);
var spOutputCollectorCaptor = ArgumentCaptor.forClass(Event.class);
@@ -190,24 +190,8 @@ public class ProcessingElementTestExecutor {
}
private PipelineElementTemplate getPipelineElementTemplate() {
- var staticProperties = processor
- .declareConfig()
- .getDescription()
- .getStaticProperties();
-
-
var configs = new ArrayList<Map<String, Object>>();
-
- staticProperties.forEach(staticProperty -> {
- var value = testConfiguration.getFieldConfiguration()
- .get(staticProperty.getInternalName());
- configs.add(
- Map.of(
- staticProperty.getInternalName(),
- value
- )
- );
- });
+ configs.add(new HashMap<>(testConfiguration.getFieldConfiguration()));
return new PipelineElementTemplate("name", "description", configs);
}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/description.json
deleted file mode 100644
index 704e89289b..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "math",
- "config": [
- {
- "type": "drop-down",
- "selector": "leftOperand",
- "value": "temperature1"
- },
- {
- "type": "drop-down",
- "selector": "rightOperand",
- "value": "temperature2"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "\\+"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/expected.csv
deleted file mode 100644
index e2fb0c1887..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;calculationResult;temperature1;temperature2
-1623871499055;5.0;2.0;3.0
-1623871500059;7.0;3.0;4.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/input.csv
deleted file mode 100644
index 1b75ffa703..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math1/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1;temperature2
-1623871499055;2;3
-1623871500059;3;4
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/description.json
deleted file mode 100644
index 7104559509..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "math",
- "config": [
- {
- "type": "drop-down",
- "selector": "leftOperand",
- "value": "temperature1"
- },
- {
- "type": "drop-down",
- "selector": "rightOperand",
- "value": "temperature2"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "\\/"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/expected.csv
deleted file mode 100644
index f11ce541a4..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;calculationResult;temperature1;temperature2
-1623871499055;1.0;4.0;4.0
-1623871500059;20.0;100.0;5.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/input.csv
deleted file mode 100644
index aaad2528eb..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math2/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1;temperature2
-1623871499055;4;4
-1623871500059;100.0;5.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/description.json
deleted file mode 100644
index 968a447ba0..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "math",
- "config": [
- {
- "type": "drop-down",
- "selector": "leftOperand",
- "value": "temperature1"
- },
- {
- "type": "drop-down",
- "selector": "rightOperand",
- "value": "temperature2"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "\\*"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/expected.csv
deleted file mode 100644
index b4d06a76a4..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;calculationResult;temperature1;temperature2
-1623871499055;8.0;4.0;2.0
-1623871500059;17.5;3.5;5.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/input.csv
deleted file mode 100644
index 9e97f57075..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/math3/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1;temperature2
-1623871499055;4;2
-1623871500059;3.5;5.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/description.json
deleted file mode 100644
index 7416eea99e..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "static_math",
- "config": [
- {
- "type": "drop-down",
- "selector": "leftOperand",
- "value": "temperature1"
- },
- {
- "type": "input",
- "selector": "rightOperandValue",
- "value": "5"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "\\*"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/expected.csv
deleted file mode 100644
index 0405380d89..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1
-1623871499055;20.0
-1623871500059;17.5
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/input.csv
deleted file mode 100644
index 437bd65baf..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath1/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1
-1623871499055;4
-1623871500059;3.5
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/description.json
deleted file mode 100644
index 948f8420e2..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "static_math",
- "config": [
- {
- "type": "drop-down",
- "selector": "leftOperand",
- "value": "temperature1"
- },
- {
- "type": "input",
- "selector": "rightOperandValue",
- "value": "1.5"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "\\/"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/expected.csv
deleted file mode 100644
index 5ec5e931b8..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1
-1623871499055;4.0
-1623871500059;2.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/input.csv
deleted file mode 100644
index 933646d2a9..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/staticmath2/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1
-1623871499055;6
-1623871500059;3
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/description.json
deleted file mode 100644
index 7edea59dac..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/description.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "trigonometry_functions",
- "config": [
- {
- "type": "drop-down",
- "selector": "operand",
- "value": "temperature1"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "sin"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/expected.csv
deleted file mode 100644
index 1e63455d3a..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1;trigonometryResult
-1623871499055;90.0;0.8939966636005579
-1623871500059;180.0;-0.8011526357338304
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/input.csv
deleted file mode 100644
index 13f65438bd..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry1/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1
-1623871499055;90
-1623871500059;180.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/description.json
deleted file mode 100644
index d8304c3b64..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/description.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "trigonometry_functions",
- "config": [
- {
- "type": "drop-down",
- "selector": "operand",
- "value": "temperature1"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "cos"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/expected.csv
deleted file mode 100644
index d306625c1e..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1;trigonometryResult
-1623871499055;120.0;0.8141809705265618
-1623871500059;150.0;0.6992508064783751
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/input.csv
deleted file mode 100644
index 1de8e270be..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/trigonometry2/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;temperature1
-1623871499055;120
-1623871500059;150.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/description.json b/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/description.json
deleted file mode 100644
index 879d5d4e70..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "value_change",
- "config": [
- {
- "type": "drop-down",
- "selector": "change-value-mapping",
- "value": "numberlist"
- },
- {
- "type": "input",
- "selector": "from-property-value",
- "value": "3"
- },
- {
- "type": "input",
- "selector": "to-property-value",
- "value": "4"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/expected.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/expected.csv
deleted file mode 100644
index def809b283..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/expected.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;isChanged;numberlist
-1623871499055;false;2.0
-1623871500059;false;3.0
-1623871501064;true;4.0
-1623871502070;false;5.0
-1623871503078;false;2.0
-1623871504082;false;3.0
-1623871505084;true;4.0
-1623871506086;false;5.0
-1623871507091;false;6.0
-1623871508093;false;7.0
diff --git a/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/input.csv b/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/input.csv
deleted file mode 100644
index 269217ab6e..0000000000
--- a/ui/cypress/fixtures/pipelineElement/enrich-jvm/valueChange1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;numberlist
-1623871499055;2
-1623871500059;3
-1623871501064;4
-1623871502070;5
-1623871503078;2
-1623871504082;3
-1623871505084;4
-1623871506086;5
-1623871507091;6
-1623871508093;7
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/description.json
deleted file mode 100644
index dc4596d5c1..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/description.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "boolean_filter",
- "config": [
- {
- "type": "drop-down",
- "selector": "boolean-mapping",
- "value": "randomboolean"
- },
- {
- "type": "radio",
- "selector": "value",
- "value": "True"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/expected.csv
deleted file mode 100644
index 84b6b2e11a..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/expected.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;randomboolean
-1623871501064;true
-1623871503078;true
-1623871505084;true
-1623871507091;true
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/input.csv
deleted file mode 100644
index 691d57416a..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomboolean
-1623871499055;false
-1623871500059;false
-1623871501064;true
-1623871502070;false
-1623871503078;true
-1623871504082;false
-1623871505084;true
-1623871506086;false
-1623871507091;true
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/description.json
deleted file mode 100644
index 94af4202c6..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/description.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "boolean_filter",
- "config": [
- {
- "type": "drop-down",
- "selector": "boolean-mapping",
- "value": "randomboolean"
- },
- {
- "type": "radio",
- "selector": "value",
- "value": "False"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/expected.csv
deleted file mode 100644
index 3a0ceb0247..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/expected.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;randomboolean
-1623871499055;false
-1623871500059;false
-1623871502070;false
-1623871504082;false
-1623871506086;false
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/input.csv
deleted file mode 100644
index 00f09c6cc0..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/booleanFilter2/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomboolean
-1623871499055;false
-1623871500059;false
-1623871501064;true
-1623871502070;false
-1623871503078;true
-1623871504082;false
-1623871505084;true
-1623871506086;false
-1623871507091;true
-1623871508093;true
\ No newline at end of file
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/description.json
deleted file mode 100644
index 5fddc6ee44..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/description.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "numerical_filter",
- "config": [
- {
- "type": "drop-down",
- "selector": "number-mapping",
- "value": "randomnumber"
- },
- { "type": "radio", "selector": "operation", "value": "\\>" },
- { "type": "input", "selector": "value", "value": "50" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/expected.csv
deleted file mode 100644
index 1639aebcb6..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/expected.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;randomnumber
-1623871499055;62.0
-1623871504082;56.0
-1623871505084;95.0
-1623871506086;77.0
-1623871507091;85.0
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/input.csv
deleted file mode 100644
index c5fb22e414..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/numericalFilter1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomnumber
-1623871499055;62.0
-1623871500059;46.0
-1623871501064;41.0
-1623871502070;41.0
-1623871503078;22.0
-1623871504082;56.0
-1623871505084;95.0
-1623871506086;77.0
-1623871507091;85.0
-1623871508093;22.0
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/description.json
deleted file mode 100644
index f749e5d16f..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/description.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "projection",
- "config": [
- {
- "type": "checkbox",
- "selector": "timestamp",
- "value": "check"
- },
- {
- "type": "checkbox",
- "selector": "a",
- "value": "check"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/expected.csv
deleted file mode 100644
index 249d92f747..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/expected.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;a
-1623871499055;a
-1623871504082;a
-1623871505084;a
-1623871506086;a
-1623871507091;a
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/input.csv
deleted file mode 100644
index 2804ec7b3f..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/projection1/input.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;remove;a
-1623871499055;62.0;a
-1623871504082;56.0;a
-1623871505084;95.0;a
-1623871506086;77.0;a
-1623871507091;85.0;a
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/description.json
deleted file mode 100644
index 302d2dac37..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/description.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "rate_limit",
- "config": [
- {
- "type": "radio",
- "selector": "grouping-enabled",
- "value": "False"
- },
- {
- "type": "radio",
- "selector": "window-type",
- "value": "Length Window"
- },
- {
- "type": "input",
- "selector": "window-type-length-window-size-2",
- "value": "5"
- },
- {
- "type": "radio",
- "selector": "event-selection",
- "value": "Last"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/expected.csv
deleted file mode 100644
index aa1a3795a6..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;randomnumber
-1623871494000;22.0
-1623871499000;26.0
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/input.csv
deleted file mode 100644
index 0291979492..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/rateLimit1/input.csv
+++ /dev/null
@@ -1,12 +0,0 @@
-timestamp;randomnumber
-1623871490000;62.0
-1623871491000;46.0
-1623871492000;41.0
-1623871493000;41.0
-1623871494000;22.0
-1623871495000;56.0
-1623871496000;95.0
-1623871497000;77.0
-1623871498000;85.0
-1623871499000;26.0
-1623871500000;21.0
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/description.json
deleted file mode 100644
index 9bd34e76e4..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/description.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "text_filter",
- "config": [
- { "type": "drop-down", "selector": "text", "value": "randomchar" },
- { "type": "radio", "selector": "operation", "value": "MATCHES" },
- { "type": "input", "selector": "keyword", "value": "c" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/expected.csv
deleted file mode 100644
index 7e5c6e7773..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/expected.csv
+++ /dev/null
@@ -1,4 +0,0 @@
-timestamp;randomchar
-1623871501064;c
-1623871504082;c
-1623871507091;c
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/input.csv
deleted file mode 100644
index d931de33a7..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomchar
-1623871499055;a
-1623871500059;b
-1623871501064;c
-1623871502070;a
-1623871503078;b
-1623871504082;c
-1623871505084;a
-1623871506086;b
-1623871507091;c
-1623871508093;a
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/description.json
deleted file mode 100644
index 98a468c93e..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/description.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "text_filter",
- "config": [
- { "type": "drop-down", "selector": "text", "value": "randomchar" },
- { "type": "radio", "selector": "operation", "value": "CONTAINS" },
- { "type": "input", "selector": "keyword", "value": "app" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/expected.csv
deleted file mode 100644
index 8cc4527118..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/expected.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-timestamp;randomchar
-1623871499055;apple
-1623871502070;apple
-1623871505084;apple
-1623871508093;apple
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/input.csv
deleted file mode 100644
index 189d1a3f56..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/textFilter2/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomchar
-1623871499055;apple
-1623871500059;banana
-1623871501064;computer
-1623871502070;apple
-1623871503078;banana
-1623871504082;computer
-1623871505084;apple
-1623871506086;banana
-1623871507091;computer
-1623871508093;apple
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/description.json b/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/description.json
deleted file mode 100644
index 110c35ed18..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/description.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "threshold_detector",
- "config": [
- {
- "type": "drop-down",
- "selector": "number-mapping",
- "value": "randomnumber"
- },
- {
- "type": "radio",
- "selector": "operation",
- "value": "\\>"
- },
- {
- "type": "input",
- "selector": "value",
- "value": "50"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/expected.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/expected.csv
deleted file mode 100644
index bcb728d490..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/expected.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomnumber;thresholdDetected
-1623871499055;62.0;true
-1623871500059;46.0;false
-1623871501064;41.0;false
-1623871502070;41.0;false
-1623871503078;22.0;false
-1623871504082;56.0;true
-1623871505084;95.0;true
-1623871506086;77.0;true
-1623871507091;85.0;true
-1623871508093;22.0;false
diff --git a/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/input.csv b/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/input.csv
deleted file mode 100644
index c5fb22e414..0000000000
--- a/ui/cypress/fixtures/pipelineElement/filters-jvm/thresholdDetection1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomnumber
-1623871499055;62.0
-1623871500059;46.0
-1623871501064;41.0
-1623871502070;41.0
-1623871503078;22.0
-1623871504082;56.0
-1623871505084;95.0
-1623871506086;77.0
-1623871507091;85.0
-1623871508093;22.0
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/description.json
deleted file mode 100644
index 316ebc2016..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/description.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "boolean_counter",
- "config": [
- { "type": "drop-down", "selector": "field", "value": "booleanToCount" },
- { "type": "radio", "selector": "flank", "value": "BOTH" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/expected.csv
deleted file mode 100644
index bb50d01551..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/expected.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;booleanToCount;counter
-1623871499055;true;1.0
-1623871502070;false;2.0
-1623871505084;true;3.0
-1623871507091;false;4.0
-1623871508093;true;5.0
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/input.csv
deleted file mode 100644
index 99442a70b3..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;booleanToCount
-1623871499055;true
-1623871500059;true
-1623871501064;true
-1623871502070;false
-1623871503078;false
-1623871504082;false
-1623871505084;true
-1623871506086;true
-1623871507091;false
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json
deleted file mode 100644
index 81ca935ddc..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/description.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "boolean_counter",
- "config": [
- {
- "type": "drop-down",
- "selector": "field",
- "value": "randomboolean"
- },
- {
- "type": "radio",
- "selector": "flank",
- "value": "BOTH"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
deleted file mode 100644
index 5d77d45b2a..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/expected.csv
+++ /dev/null
@@ -1,8 +0,0 @@
-timestamp;counter;randomboolean
-1623871501064;1.0;true
-1623871502070;2.0;false
-1623871503078;3.0;true
-1623871504082;4.0;false
-1623871505084;5.0;true
-1623871506086;6.0;false
-1623871507091;7.0;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv
deleted file mode 100644
index 691d57416a..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanCounter2/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;randomboolean
-1623871499055;false
-1623871500059;false
-1623871501064;true
-1623871502070;false
-1623871503078;true
-1623871504082;false
-1623871505084;true
-1623871506086;false
-1623871507091;true
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/description.json
deleted file mode 100644
index ad23b24dda..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/description.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "boolean_inverter",
- "config": [
- {
- "type": "drop-down",
- "selector": "invert-field",
- "value": "booleanToInvert"
- }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/expected.csv
deleted file mode 100644
index 653aa9aaec..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/expected.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;booleanToInvert
-1623871499055;false
-1623871500059;false
-1623871501064;false
-1623871502070;true
-1623871503078;true
-1623871504082;true
-1623871505084;false
-1623871506086;false
-1623871507091;true
-1623871508093;false
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/input.csv
deleted file mode 100644
index 71796a047e..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/booleanInverter1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;booleanToInvert
-1623871499055;true
-1623871500059;true
-1623871501064;true
-1623871502070;false
-1623871503078;false
-1623871504082;false
-1623871505084;true
-1623871506086;true
-1623871507091;false
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/description.json
deleted file mode 100644
index 119f469cbc..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/description.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "count_array",
- "config": [
- { "type": "drop-down", "selector": "array-field", "value": "arrayProperty" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/expected.csv
deleted file mode 100644
index c043270cf3..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/expected.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-timestamp;arrayProperty;countValue
-1623871499055;[ "java.util.ArrayList", [ 1, 2, 4, 4 ] ];4.0
-1623871500059;[ "java.util.ArrayList", [ 1, 4 ] ];2.0
-1623871507091;[ "java.util.ArrayList", [ 1, 3, 3, 3, 4 ] ];5.0
-1623871508093;[ "java.util.ArrayList", [ 1 ] ];1.0
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/input.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/input.json
deleted file mode 100644
index 24ac9f09d2..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/countArray1/input.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- { "timestamp": 1623871499055, "arrayProperty": [1, 2, 4, 4] },
- { "timestamp": 1623871500059, "arrayProperty": [1, 4] },
- { "timestamp": 1623871507091, "arrayProperty": [1, 3, 3, 3, 4] },
- { "timestamp": 1623871508093, "arrayProperty": [1] }
-]
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/description.json
deleted file mode 100644
index 2b23587408..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/description.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "field_hasher",
- "config": [
- {
- "type": "drop-down",
- "selector": "property-mapping",
- "value": "sensorId"
- },
- { "type": "radio", "selector": "hash-algorithm", "value": "SHA1" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/expected.csv
deleted file mode 100644
index 9ae74591f5..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;sensorId
-1623871499055;a9993e364706816aba3e25717850c26c9cd0d89d
-1623871500059;40bd001563085fc35165329ea1ff5c5ecbdbbeef
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/input.csv
deleted file mode 100644
index bcbd5414db..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher1/input.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;sensorId
-1623871499055;abc
-1623871500059;123
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/description.json
deleted file mode 100644
index 0de2f317cd..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/description.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "field_hasher",
- "config": [
- {
- "type": "drop-down",
- "selector": "property-mapping",
- "value": "sensorId"
- },
- { "type": "radio", "selector": "hash-algorithm", "value": "MD5" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/expected.csv
deleted file mode 100644
index bad17b41ad..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;sensorId
-1623871499055;900150983cd24fb0d6963f7d28e17f72
-1623871500059;202cb962ac59075b964b07152d234b70
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/input.csv
deleted file mode 100644
index 3f2fd7638a..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldHasher2/input.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-timestamp;sensorId
-1623871499055;abc
-1623871500059;123
-
-
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/description.json
deleted file mode 100644
index 39424cb7cf..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/description.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "field_mapper",
- "config": [
- { "type": "checkbox", "selector": "value1", "value": "check" },
- { "type": "checkbox", "selector": "value2", "value": "check" },
- { "type": "input", "selector": "fieldName", "value": "hashedField" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/expected.csv
deleted file mode 100644
index cddd87630b..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;hashedField
-1623871499055;e80b5017098950fc58aad83c8c14978e
-1623871500059;e10adc3949ba59abbe56e057f20f883e
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/input.csv
deleted file mode 100644
index 38082515b0..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldMapper1/input.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-timestamp;value1;value2
-1623871499055;abc;def
-1623871500059;123;456
-
-
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/description.json
deleted file mode 100644
index 680c0df867..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/description.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "field_renamer",
- "config": [
- { "type": "drop-down", "selector": "convert-property", "value": "count" },
- { "type": "input", "selector": "field-name", "value": "newname" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/expected.csv
deleted file mode 100644
index a03ba37cc7..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/expected.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;newname
-1623871499055;122.0
-1623871500059;123.0
-1623871501064;124.0
-1623871502070;125.0
-1623871503078;126.0
-1623871504082;127.0
-1623871505084;128.0
-1623871506086;129.0
-1623871507091;130.0
-1623871508093;131.0
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/input.csv
deleted file mode 100644
index ac4fd1b928..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/fieldRenamer1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;count
-1623871499055;122.0
-1623871500059;123.0
-1623871501064;124.0
-1623871502070;125.0
-1623871503078;126.0
-1623871504082;127.0
-1623871505084;128.0
-1623871506086;129.0
-1623871507091;130.0
-1623871508093;131.0
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/description.json
deleted file mode 100644
index d19d9560b4..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/description.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "signal_edge_filter",
- "config": [
- {
- "type": "drop-down",
- "selector": "boolean_signal_field",
- "value": "booleanEdge"
- },
- { "type": "radio", "selector": "flank", "value": "BOTH" },
- { "type": "input", "selector": "delay", "value": "0" },
- { "type": "radio", "selector": "event-selection-id", "value": "Last" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/expected.csv
deleted file mode 100644
index 7470d5ba12..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/expected.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-timestamp;booleanEdge
-1623871499055;true
-1623871502070;false
-1623871505084;true
-1623871507091;false
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/input.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/input.csv
deleted file mode 100644
index cfd55885b0..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/signalEdgeFilter1/input.csv
+++ /dev/null
@@ -1,11 +0,0 @@
-timestamp;booleanEdge
-1623871499055;true
-1623871500059;true
-1623871501064;true
-1623871502070;false
-1623871503078;false
-1623871504082;false
-1623871505084;true
-1623871506086;true
-1623871507091;false
-1623871508093;true
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/description.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/description.json
deleted file mode 100644
index ca76285518..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/description.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "split_array",
- "config": [
- {
- "type": "drop-down",
- "selector": "array-field",
- "value": "arrayProperty"
- },
- { "type": "checkbox", "selector": "timestamp", "value": "check" }
- ]
-}
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/expected.csv b/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/expected.csv
deleted file mode 100644
index 9bb212a008..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/expected.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-timestamp;array_value
-1623871500059;4.0
-1623871508093;1.0
diff --git a/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/input.json b/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/input.json
deleted file mode 100644
index 9b7021bbcc..0000000000
--- a/ui/cypress/fixtures/pipelineElement/transformation-jvm/splitArray1/input.json
+++ /dev/null
@@ -1,4 +0,0 @@
-[
- { "timestamp": 1623871500059, "arrayProperty": [1, 4] },
- { "timestamp": 1623871508093, "arrayProperty": [1] }
-]
diff --git a/ui/cypress/plugins/index.ts b/ui/cypress/plugins/index.ts
index d850a05d78..0c0cea3121 100644
--- a/ui/cypress/plugins/index.ts
+++ b/ui/cypress/plugins/index.ts
@@ -32,6 +32,13 @@ import { ProcessorTest } from '../support/model/ProcessorTest';
// tslint:disable-next-line:no-var-requires
const { rmdir } = require('fs');
+const supportedProcessingElementTests = new Set([
+ 'enrich-jvm/jsEvaluator1',
+ 'enrich-jvm/jsEvaluator2',
+ 'filters-siddhi/increase1',
+ 'filters-siddhi/increase2',
+ 'filters-siddhi/increase3',
+]);
function readProcessingElements(): ProcessorTest[] {
const result: ProcessorTest[] = [];
@@ -43,17 +50,19 @@ function readProcessingElements(): ProcessorTest[] {
'cypress/fixtures/pipelineElement/' + dir,
);
subfolder.forEach(test => {
+ const fixturePath = dir + '/' + test;
+ if (!supportedProcessingElementTests.has(fixturePath)) {
+ return;
+ }
const testDescription = fs.readFileSync(
'cypress/fixtures/pipelineElement/' +
- dir +
- '/' +
- test +
+ fixturePath +
'/description.json',
);
// @ts-ignore
const pt = new ProcessorTest();
pt.name = test;
- pt.dir = dir + '/' + test;
+ pt.dir = fixturePath;
const configDir = fs.readdirSync(
'cypress/fixtures/pipelineElement/' + pt.dir,