How to (unit) test extensions during developement?

Hello Forum,

I tried to package up some of my checks which could be useful for others as extensions. To ensure the check does work as expected I would like to add some unit tests to it. The official checkmk repo has some unit tests for some of the checks. However I have not found a easy way to use them in my repo as it heavily depends on cmk functionality. Has any of out any experience with writing standalone unit (or integration) tests for checkmk extensions?

Cheers

1 Like

Hi @Jiuka,
Great thread by the way.
Just my two cents and i hope somehow it helps you out.

When i’m developing SNMP checks i usually dump snmp from one (or more) hosts into snmpwalk dir and create a " Simulating SNMP by using a stored SNMP walk" rule in WATO.
So i’m not somehow stressing devices and can always edit snmpwalk file to change something (eg, taking some value higher or getting an interface status differenty).

Just bookmarked your thread. Really nice topic!

Cheers,

1 Like