|
Automated Testing of SCADA Protocols
III.B. Minimal Example
Once again, suppose we wished to test the implementation of protocol X in the device under test by sending the one byte payloads 1, 11, 111. Again, suppose the protocol specification states the correct behavior is to send a one byte 0 back.
For this stateless test our grammar file may look like this:
The test cases produced by this grammar would be:
The executor would read these test cases in from a file and one by one send out the bytes following the TX:0 and expect back those following the RX:0.
The modular nature of this blackPeer design allows different levels of functionality to be made available to different categories of users. For example, a plant worker who knows little of communication protocols but much about PLC's may be given a testCases file and an appropriate testCase_Executor. An industrial engineer on the other hand may be given the testCase_Generator thus allowing him to create a variety of testCases files depending on the nature of the variable init file he creates.
This modular nature also allows for the easy transition between different protocols. That is, to test a different protocol all that is needed is a new grammar file and an appropriate testCase_Executor.
« Prev | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next »
|