Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[kapua-dev] Emulating device connectivity in Kapua integration tests

Hi Uros et al.,

Recently we've been talking about the possibility of introducing embedded ActiveMQ  broker for sake of device connectivity integration testing.

Some background here:
We would like to create integration tests which would ensure us that devices can access Kapua APIs and can invoke MQTT operations as expected. The idea here would be that we can create mock device using MQTT Paho client and started embedded Kapua broker and use this setup in JUnit/CI.

I created a simple POC [1] demonstrating how we could use embedded ActiveMQ and Paho in order to achieve this kind of functionality [2]. Here is a basic implementation of the mock device [3] which can give you the rough idea of how such mock device could work. And here is the Kapua broker [4].

Please let me know what you think about this approach - if you are fine with it, I would like to introduce similar functionality into Kapua. Any feedback will be highly appreciated!

Laters!

[2] https://github.com/hekonsek/kapua-test-broker/blob/master/src/test/java/kapua/test/broker/TestBrokerTest.java#L8
[3] https://github.com/hekonsek/kapua-test-broker/blob/master/src/main/java/kapua/test/broker/MockDevice.java
[4] https://github.com/hekonsek/kapua-test-broker/blob/master/src/main/java/kapua/test/broker/TestBroker.java


--
Henryk Konsek

Back to the top