User Tools

Site Tools


kb:bestpractices:testing:dqmh

04 DQMH Modules

Probably one of the most important things to consider when developing unit tests for DQMH modules is the sequence of requests the module needs for correct operation.

  • One of the first things to test for are the starting and stopping of the module and its configuration.
  • Once this has been proved, then progressively more complex operations can be added.
  • Do not jump to more complex operations if the step before does not have a test!
  • Numbering the unit tests can help, but usually naming them with a combination of numbers and names would be very helpful as an indication of what it is the UTs are for and what is the order they should run in.

Testing Broadcasts

  • In order to test broadcasts, make sure to register for the broadcasts before they are fired.
  • It is a good idea to use the Error Reported broadcast for a separate assertion.

Testing integration features

Although it is borderline the remit of a unit test, with this framework it is possible to test some integration features, such as parallel running.

Make sure to clear possible errors if similar unit tests run in sequence:

kb/bestpractices/testing/dqmh.txt · Last modified: 2023/05/12 06:31 by alexander.elbert