next up previous contents
Next: Subscription Architecture Up: Implementing OPC Server Functionality Previous: The Twisted Framework   Contents

Unit Tests for the OPC Server

While designing certain server functionality and implementing some simple OPC server functions, it was found out that the resulting code had to be thoroughly tested for correctness and minor changes could lead to erroneous behavior. For this reason, unit testing was established. However, testing a server supporting concurrent requests is far more complicated than a single, synchronous function. For testing concurrent requests, the unit test itself must implement concurrency. Fortunately, Twisted provides a unit test library that is tailored to these needs.

To test an OPC server, a suitable client is needed, which led to the development of Twisted-based OPC client functions. These functions were then used to test most OPC operations, such as Read and Write and also complicated issues, such as the subscription architecture.

Hermann Himmelbauer 2006-09-27