[
https://issues.apache.org/jira/browse/NIFI-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16620399#comment-16620399
]
ASF GitHub Bot commented on NIFI-5318:
--------------------------------------
Github user peter-gergely-horvath commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2872#discussion_r218744472
--- 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 --
Yes, absolutely. After reading the paragraph once again, I'm wondering if
it would make sense to change `us` to `you` (referring to the user), but it is
you call, really.
If you think it makes sense, can you do it while you merge/squash the
commit?
> 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)