[
https://issues.apache.org/jira/browse/NIFI-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618030#comment-16618030
]
ASF GitHub Bot commented on NIFI-5318:
--------------------------------------
Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2872#discussion_r218193985
--- Diff: nifi-docs/src/main/asciidoc/developer-guide.adoc ---
@@ -2296,6 +2296,32 @@ threads that should be used to run the Processor can
be set via the `setThreadCount(int)` method.
+=== Experimental NiFi Flow test harness
+
+NiFi now has an experimental feature for full end-to-end testing of flows.
This allows us
+to take a NiFi flow, install it to a test NiFi instance, run it and make
Java unit test
+like asserts regarding its behaviour.
+
+The class `org.apache.nifi.test.TestNiFiInstance` is a thin wrapper that
allows us
+to manipulate a NiFi installation and deploy a flow with some adjustments
+to its configuration, including changing processor properties and
replacing processor
+classes with mocks.
+
+In order to add the necessary classes to your project,
--- End diff --
Just to clarify, you mean external projects that use NiFi. To use this with
NiFi's code base, a developer would have to add something to the end of the
build system that would run the tests after the assembly is built based on what
I've seen reviewing this. Is that right or am I missing something?
Just want to make sure in case we have to answer questions from people come
in and try to use this to test their contributions.
> Implement NiFi test harness
> ---------------------------
>
> Key: NIFI-5318
> URL: https://issues.apache.org/jira/browse/NIFI-5318
> Project: Apache NiFi
> Issue Type: New Feature
> Reporter: Peter Horvath
> Priority: Major
>
> Currently, it is not really possible to automatically test the behaviour of a
> specific NiFi flow and make unit test type asserts if it works as expected.
> For example, if the expected behaviour of a NiFi flow is that a file placed
> to a specific directory will trigger some operation after which some output
> file will appear at another directory, once currently can only do one thing:
> test the NiFi flow manually.
> Manual testing is especially hard to manage if a NiFi flow is being actively
> developed: any change to a complex, existing NiFi flow might require a lot of
> manual testing just to ensure there are no regressions introduced.
> Some kind of Java API that allows managing a NiFi instance and manipulating
> flow deployments like for example, [Codehaus
> Cargo|]https://codehaus-cargo.github.io/] would be of great help.
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)