more G-Labs products

Author Topic: ZWaveLib + UnitTests (a call to developers)  (Read 954 times)

April 15, 2017, 08:12:40 AM
Read 954 times


  • ***
  • Information
  • Full Member
  • Posts: 94

Recently I found out that Sigma Designs partly opened ZWave protocol specification to the public (thanks to this forum). So I decided to cover ZWaveLib (used in HomeGenie and developed mostly by Gene) with unit tests to be sure that it conforms the standards.

Now I'm writing tests for command classes, from the bottom of the list to top. I'm adding comments to classes and to the tests with references to the documentation and also add new methods, that should be implemented, but were not implemented yet. I also did some refactoring to make code testable and more readable, so right now it's not 100% compatible with MIG library. At the end of this rework, I will need to tune up MIG library to use the new version of ZWaveLib. But I'm trying to make things backward compatible and mark deprecated methods with ObsoleteAttribute.

I configured automatic building, testing, and test covering with Appveyor and Codecov.
If you are a developer and could contribute to this activity - I encourage you to do so.

Here is the link to my fork of repository
« Last Edit: April 15, 2017, 08:23:48 AM by Bounz »

April 15, 2017, 10:26:38 AM
Reply #1


  • ****
  • Information
  • Sr. Member
  • Posts: 143
Sounds great. Have been looking into this as well but my coding skills are not sufficient to do this...Happy to help in testing when ready. I have a mix of various X10 and Z-wave devices in my set-up running on RPI3 +Razberry + CM15pro.


April 21, 2017, 11:08:05 AM
Reply #2


  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Bounz,

I can help you for some tests, I am senior developper in C#.
I will download your github project, then I can make some tests for you and correct some issues in ZWaveLib, I have found with my nodes. I transmit those to Gene some time ago but no answer.


April 21, 2017, 11:40:44 AM
Reply #3


  • ***
  • Information
  • Full Member
  • Posts: 94
Hi dani,

Glad to hear, that you can join me in this task.
Please, start writing tests to command classes from the top of the list: Alarm, Association and so on.
Also, I really recommend you to use official documentation from

PS. Looks like they have updated their documents, so document numbers in my comments are not relevant.

April 22, 2017, 11:11:13 AM
Reply #4

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Nice work, I don't have Zwave so wont be much use but I am still trying to learn unit testing in c# having now done a lot of testing using pester for powershell..

April 22, 2017, 11:19:20 AM
Reply #5


  • ***
  • Information
  • Full Member
  • Posts: 94
Wow, a BDD-style testing framework for PowerShell! I have never heard about it.
If you want to know more about unit testing in C# I can recommend you to read "The Art of Unit Testing" book by Roy Osherove (