Hi,
I’m developing a test system which communicates with OpenTAP remotely using Runner. In order to avoid started test runs to fail due to instrument issues, I would like to find a way to validate that all instruments in the session are up-and-running properly. The function/method should identify any instruments e.g. not responding. This information will then be fed back to the user so that he/she can check connections etc (this communication is done using the system backend/frontend). By instrument I mean a custom-made instrument plugin.
Some of the options I have considered are:
- Create a test step which attempts to open all of the instruments. If any instrument fails to open, the test step triggers an error verdict. I’m not sure though how it can be conveyed exactly which instrument that failed. I guess one option would be to create one such test step for each instrument, but that approach seems a bit cumbersome to me.
- Place the Open() method of the instrument inside a try block and catch any exception thrown when attempting to open the instrument. The full type name of the instrument can then be added to the exception, possibly using a custom-made exception which takes the full name as an argument. Though, I don’t know where to catch this exception in a test step or similar, as instruments are opened prior to executing any test step code.
Any ideas on how to accomplish this kind of validation?
Thanks in advance!
Tomas