OH2 Unit tests for bindings - how to start?


I like to use unit tests for my OH2 binding, but don’t know how to get startet. Is there a way to create a kind of skeleton for unit tests for a binding?

Thanks and best regards

There is a description for Eclipse SmartHome.

The skeleton script there also creates you the fragment already, but afaik this has not yet been ported over the the openHAB2 script - nonetheless, it could give you a start.

1 Like

Hello Kai,

could you provide a good example of binding test? In the article Testing Eclipse SmartHome described 2 different kinds of approaches for testing Eclipse SmartHome. Please, provide good examples for both approaches, if any.