Home
 
  iLIBRARY
 
  About iSYSTEM   Impressum
 

Embedded Unit Tests with iSYSTEM Tools

An important part of iSYSTEM’s Integrated Development Environment (IDE) winIDEA is the isystem.connect interface. It allows the IDE to be driven by an external application, which can actively steer it or just acquire data from the target. This could be an Excel script filling a table of temperature readouts over time, a production stage application which programs the microcontroller FLASH and verifies RAM, application which, through data acquisition, realizes embedded unit tests, a hardware-in-the-loop system test, etc.

The interface is a library that enables external client to connect to winIDEA and programmatically control the target. The library contains API for debug functionality (running, stepping, breakpoint, registers, variables, memory, ...), trace, coverage, profiler, and project handling. To perform Embedded Unit Tests, iSYSTEM provides a test framework (isystem.test) on top of the isystem.connect C++ API. The main purpose of this test interface is embedded unit testing on a level of single functions without code instrumentation. isystem.test adds tools and an additional layer of functionality to perform these kind of tests. To simplify the use of the API, iSYSTEM built so called façade classes. These classes are a more abstract view on the generic C++ API. iSYSTEM also added façade classes to enable developers and testers to use script languages such as Python and Java.

Example using isystem.connect base and façade (more abstract) classes:

This example shows the difference between base and facade classes. iSYSTEM’s façade classes simplify the use of the interface for its appropriate purpose and increase the productivity of use. The following code performs download, sets a breakpoint, starts the target, and finally removes the breakpoint:

 

Using base classes

m_pIConnectDebug.RunControl(IConnectDebug::rDownload, 0, 0);
m_pIConnectDebug.SetBreakpoint(IConnectDebug::bSymbol | IConnectDebug::bSet, 0, 0, "myFunction", 0);
m_pIConnectDebug.RunControl(IConnectDebug::rRun, 0, 0);
IConnectDebug::SStatus status;
do {
m_pIConnectDebug.GetStatus(IConnectDebug::tCPU, &status);
Sleep(200);
} while (status.m_byStatus != IConnectDebug::stStopped);
m_pIConnectDebug.SetBreakpoint(IConnectDebug::bSymbol | IConnectDebug::bClear, 0, 0, "myFunction", 0);


Using facade classes

debug.download();
debug.setBP("myFunction");
debug.run();
debug.waitUntilStopped(0, 200);
debug.deleteBP("myFunction");


isystem.test consists of two main groups of classes, which are shown in the class diagram below.
The first group with the main class CTestCase contains embedded unit tests execution logic. Classes shown in gray are from the isystem.connect Facade group.
The second group of classes with the main class CTestStep contains data classes, which contain the embedded unit tests specification. They are also able to parse test data written in YAML and emitting specification to YAML format.


 
 

ARM-Cortex  |  Eclipse for Embedded  |  Embedded Code Coverage  |  Embedded Unit Tests  |  Freescale Coldfire MCF5xxx  |  Freescale i.MX
Freescale MC9(S)08  |  Freescale MC9S12x  |  Freescale MPC55xx  |  Freescale MPC56xx  |  Freescale PowerQuicc  |  HIL-Test  |  Infineon TriCore
Infineon XC2xxxED  |  JTAG/Boundary Scan Test IEEE 1149.1  |  NEC 78Kx  |  NEC V850  |  PowerArchitecture  |  Renesas R8C/3x
STMicroelectronic SPC560xx  |  STMicroelectronic STM32  |  Texas Instruments TMSx70  |  Z80/Z181  |  8051