Dear All, In the past, I had some cases when testing a complex NiFi flow became a tedious manual exercise: that's where the idea came that maybe it would be possible to automate these steps somehow.
I have developed a small sample NiFi test harness that allows you to install a NiFi flow to a test NiFi instance and finally, I've managed to push the sample through our company's open sourcing process. The repository is available on GitHub: https://github.com/Thi nkBigAnalytics/nifi-test The proof-of-concept demonstrates two possible approaches: - NiFiFlowTest [1] demonstrates a solution where a processor's properties are re-written before the test is performed, allowing some mock source service to be used. - NiFiMockFlowTest [2] demonstrates how a processor in the flow could be replaced and mocked by a custom class. There are some limitations, for example, detecting if NiFi is up and running [3], but generally speaking, the concept seems to be usable. If you think this sample would be helpful for you, please give it a try: I'm happy to receive feedback as well. I am wondering if there is someone who would be willing to enhance the solution further, or even merge some re-usable parts into the NiFi code base. Thanks, Peter [1] https://github.com/ThinkBigAnalytics/nifi-test/ blob/master/src/test/java/com/thinkbiganalytics/nifi/test/NiFiFlowTest.java [2] https://github.com/ThinkBigAnalytics/nifi-test/ blob/master/src/test/java/com/thinkbiganalytics/nifi/test/ NiFiMockFlowTest.java [3] https://github.com/ThinkBigAnalytics/nifi-test/ blob/master/src/main/java/com/thinkbiganalytics/nifitest/ TestNiFiInstance.java#L206