Automated Tests with Ozone

From SEGGER Wiki
Jump to: navigation, search

Ozone features an advanced Scripting interface which can be used for automated tests as well. A simple example of such a setup will be shown in the following article. This can then be used as baseline to e.g. export Code Profile or Instruction Trace reports.

Debug example

Example Setup Requirements

For the automated test example that will be shown in this article the following minimum requirements must be met:

  • J-Link software V6.30h or later
  • Ozone V3.30a or later
  • Any J-Link/J-Trace model (Base or higher) that can be used with Ozone
  • SEGGER Cortex-M Trace Reference Board with a STM32F407 target device

Example project

The following sample project is designed to be used with J-Link/J-Trace and Ozone to demonstrate automation with Ozone. The project has been tested with the minimum requirements mentioned above and a Cortex-M Trace Reference Board. The sample project comes with a pre-configured project file for Ozone that runs out-of-the box. In order to rebuild the sample project, SEGGER Embedded Studio can be used. The example project can be downloaded here:

Ozone_Automation_Demo_ST_STM32F407.zip

The following steps will be executed in the example:

  1. Load test application
  2. Set a breakpoint
  3. Run to the breakpoint
  4. Execute a function that has been set to run when breakpoint is hit
  5. Close Ozone

Note: This is only an example test automation and it can be adjusted to individual needs using the extensive scripting interface of Ozone. More information can be found in the Ozone user manual.

Trace example

Example Setup Requirements

For the automated test example that will be shown in this article the following minimum requirements must be met:

  • J-Link software V6.60f or later
  • Ozone V3.30a or later
  • Any J-Trace PRO V1 or later
  • SEGGER Cortex-M Trace Reference Board with a STM32F407 target device
  • An empty folder located at C:\SEGGER\ to export the trace data to. If you want to use another path or you are not using Windows as your host OS make sure to edit the .jdebug file accordingly before executing the example.

Example project

The following sample project is designed to be used with J-Trace PRO and Ozone to demonstrate trace test automation with Ozone. The project has been tested with the minimum requirements mentioned above and a Cortex-M Trace Reference Board. The sample project comes with a pre-configured project file for Ozone that runs out-of-the box. In order to rebuild the sample project, SEGGER Embedded Studio can be used. The example project can be downloaded here:

ST_STM32F407_TRB_Automation.zip

The following steps will be executed in the example:

  1. Load test application
  2. Set three breakpoints
  3. Run to each breakpoint and wait for a short while
  4. At each breakpoint on the board a different LED will light up
  5. When last breakpoint is hit the collected trace data is exported in different formats

Note: This is only an example test automation and it can be adjusted to individual needs using the extensive scripting interface of Ozone. More information can be found in the Ozone user manual.

Example exports

The example exports from the example project above can be found in the following zip: Example_Exports.zip