streampipes
streampipes copied to clipboard
Provide a framework to easily unit test processing elements
Body
Description
It is currently challenging for developers to write unit tests for processing elements. A dedicated test framework is needed to facilitate testing with various user inputs efficiently. The focus should be on extensive testing of the onEvent method.
Proposed API
var processor = new ProcessingElementUnderTest();
var userConfiguration = Map.of("key-textFIlter", "text");
var inputEvents = List.of(
new Event(),
new Event()
);
var expectedOutputEvents = List.of(
new Event(),
new Event()
);
ProcessingElementTestExecuter.run(processingElement, userConfiguration, inputEvents, expectedOutputEvents);
StreamPipes Committer
I acknowledge that I am a maintainer/committer of the Apache StreamPipes project.