This is my fist time to develop a SNMP connector for a client and to take a real task, I've created the write/read parameters and now I'm asked to write unit test to make sure the connector is working as expected, but Qactions has no functions to test and I can't imagine what kind of tests I should create to make sure the connector is working as expected, can anyone help me on how to analyze tests that need to be created for a SNMP connector only has read/write parameters, groups and timers?
Hi,
As Edib mentioned, unit tests are meant to ensure that small parts of your code do what is expected. This makes it easier to pinpoint the problem in a complex solution in case something goes wrong.
Since your SNMP connector consists mostly of polling and possibly a few actions on the XML side, it is not very suitable for unit testing.
Apart from Edib's suggestion of a thorough QA process, you could look into Integration Testing or Regression Testing, which would be similar to what we do at Skyline when we test the entire software.
You could either via connection with a real device or an SNMP simulation have a testing element created on your Development/Staging/QA environment and then use something like an automation script that goes and reads certain parameters from the element and verifies they contain the expected value.
This typically is a more complex process but if you would really like to have automated testing for your new connector then it is something you can look into.
Okay thanks a lot