samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Fang <>
Subject Re: Samza Unit Test Instrucations
Date Thu, 16 Apr 2015 00:23:54 GMT
Hi Yuanchi,

There is no out-of-box unit tests provided by Samza. But there are some

1) If you only want to test the logic in the Task class, normal unit tests
will work. You can create a unit test that tests init(), process(), etc.

2) Create mock systems by implementing SystemAdmin, SystemConsumer, etc.
You can refer to this one TestSystemStreamPartitionIterator

3) bring up zookeeper, kafka in the unit test. Here is the reference

4) run the job locally
<> by
setting the job.factory.class

Usually, I think 1) and 4) are sufficient. Hope this helps.


Fang, Yan

On Wed, Apr 15, 2015 at 1:47 PM, Yuanchi Ning <> wrote:

> Hello Samza Team,
> This is Yuanchi Ning from Uber Data Engineering, Realtime Metrics,
> Streaming Platform team.
> We are planning to use Samza to process the realtime data we have, and
> thanks for developing such an awesome open source project.
> While I am building our streaming service using Samza, I am wondering is
> there anyway to do unit tests for each Samza application Task instead of
> integration test? Say, set up the mocker environment for feeding data into
> MessageEnvelope or something similar?
> Thanks for your assistance.
> Best,
> Yuanchi

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message