USER IO in simple (example) test GUI?

While the dialog steps work well in the editor, the example GUI does not implement the user interface. Using breakpoints I see the dialog boxes call the routines in the GUI but pass a type “object” for which the parameters vary (or don’t exist) depending on how the user interface call was generated. The basic dialog example passes parameters, but the SN dialog example does not.

Is there an example of how to typecase the “object” to a meaningful dialog structure if the .toString shows that it is defined by the Basic dialog?

I assume wjat I’m looking for is: OpenTAP.TUI/TuiUserInput.cs · master · OpenTAP / Plugins / Keysight Technologies / OpenTAP-TUI · GitLab

1 Like

Hi @craig.petku,

I would strongly suggest looking to the TUI for inspiration. Most things you could want to implement in an OpenTAP test plan editor and runner can be found there.

This part is probably the most important:

 var annotations = AnnotationCollection.Annotate(dataObject);
 var members = annotations?.Get<IMembersAnnotation>()?.Members?.ToList();

AnnotationCollection is the class we use to display and edit data. In many cases it is enough to support IStringValueAnnotation.

IStringValueAnnoations can be found on properties that can be edited and viewed as strings. For example numbers.

IAvailableValueAnnotationProxy can be found on propeties that can be edited and viewed as a drop down.

Many others exists, but the TUI implements support for most things.

2 Likes