PrePlanRun errors in ResultListener

Is there any way to capture PrePlanRun errors with a ResultListener? Primarily when an instrument fails to open for some reason e.g. wrong connection string.

Hi @benstreek,

In this case, you should get the OnTestPlanRunStart and OnTestPlanRunCompleted events.

In the TestPlanRunCompleted event you will get an error verdict on the plan run object and then the log as a stream. The log should contain the information you need.

Do you need access to the instance of the exception itself on the instrument?

Thanks, @rolf_madsen.
Having access to the exception would be nice, but a dump of the log would probably be sufficient. It’s more just so I can signal to the operator that something’s wrong with the system and they need to get support involved.

I guess I could keep a record of TestStepRuns from the TestStepStarted event, then if the plan ends with an error and no steps have been run, I know something went wrong in the PrePlanRun.