Thanks for the prompt response Mark.
My idea was to have a NiFi workflow defined and to be able to run some
automated tests on it. I thought that maybe there was a way to start an
embedded version of NiFi programatically and to interact with it.
I did see the TestRunner class and I even used it for some of the unit
tests of some custom processors I've implemented. TestRunner seems to be
exactly what I'm looking for, but instead of being focused in a single
processor, I need something that allows me to run multiple processors that
compose a flow.
I do agree that each individual processor must be tested using a
TestRunner, but I was planning on doing something more like an integration
test of an entire flow.

Regards,




XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com

On Tue, Feb 24, 2015 at 4:42 PM, Mark Payne <[email protected]> wrote:

> Esteban,
>
>
> NiFi does not allow you to run it embedded. However, it does provide a
> “Mock Framework” that we use very heavily for doing unit testing of NiFi
> components.
>
>
> Can you explain your use case a bit further? What exactly are you trying
> to unit test?
>
>
> Thanks
>
> -Mark
>
>
>
>
>
>
> From: Esteban Aliverti
> Sent: ‎Tuesday‎, ‎February‎ ‎24‎, ‎2015 ‎8‎:‎34‎ ‎AM
> To: [email protected]
>
>
>
>
>
> Hello,
> My name is Esteban Aliverti and I'm currently trying to use NiFi in one of
> my company's projects. The idea is to use NiFi behind a java API.
> What I was wondering is if there's any way to run NiFi embedded so I can
> easily build unit tests without having to start a separate NiFi server
> before I run the tests. Another important thing is that each test should be
> self-contained and thus I would like them to always run in a "clean" NiFi
> instance.
> What I was thinking was a way to programatically configure and start NiFi
> and maybe import a workflow from a template definition I can create
> beforehand.
> Is this currently possible? If not, any suggestion?
>
> Regards,
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
> - Blog @ http://ilesteban.wordpress.com
>

Reply via email to