Test Automation and Test Scripting Support by Universal Debug Engine with Python and other scripting languages

The Universal Debug Engine (UDE) is a powerful development platform to develop, test and maintain microcontroller software applications. Besides its interactive debugging capabilities UDE provides an open and flexible interface for scripting as well as for debug and test automation.

UDE Object Model

UDE’s object model is the base technology of the provided interface.

  • Allows access to debugger kernel functions and components based on Microsoft® COM (Component Object Model)
  • Covers functions from basic debugging to complex trace and analysis use cases.

To get an easy access to its powerful functionality UDE’s object model is described in detail by the UDE help system. In addition to the programmer’s reference, examples guide you during the first steps.

Test Scripting with UDE

UDE supports internal scripts – macros for routine and test tasks during interactive debug sessions – and external scripts for debugger automation. The creation of scripts and macros is not bound to a proprietary language. Rather, any language can be used which provides support for Microsoft® COM. This includes for example (without any claim to completeness):

  • Python
  • VisualBasic
  • JavaScript
  • Perl.

The open and flexible test automation interface can be utilized by 3rd party tools. A number of test tool vendors are using UDE’s object model functions since years to get direct access to the target embedded system. If you develop your own test and analysis tools, the language independent COM interfaces allow an easy and standardized way to communicate with UDE and getting access to its powerful debug and test features.

Scripting with Python

Python is a modern scripting language with COM support. UDE supports internal Python scripts that can be executed in the UDE Python Script Console, which implements an interactive command line interface to an embedded Python 3 interpreter. Currently, a Python 3.12 interpreter is embedded in UDE.

In addition, external Python scripts can control UDE in a similar way via the COM interface.

UDE Python Scripting Console

The Python script console can be used to enter Python instructions directly into the console or to load from external sources, the output is displayed in the UDE Python Script console view. Following functions are supported

  • Embedded Python V3.10.4+ (UDE 2023) / V3.12.2+ (UDE 2024) interpreter
  • Inline execution of simple Python statements and execution of external Python scripts
  • Auto-completion of Python keywords and UDE class methods and properties, variable inspections
  • Callback functions for UDE events
  • External dialog interface.

Accessing the UDE object model

The Python script console provides some predefined COM objects of UDE. The following script gives an example of simple accessing the UDE debugger, break the current execution and list the UDE workspace used:

  >>> UDEDebugger = UDEWorkspace.GetActiveDebugger()
  >>> UDEDebugger.Break()
  >>> UDEWorkspace.ProjectTitle()

Supported Architectures with Universal Debug Engine (UDE Debugger)