winIDEA SDK
Loading...
Searching...
No Matches
Target unit tests

Introduction

The winIDEA SDK includes a unit test API that creates unit tests for target code, runs them on the target, and provides test results.

For improved productivity, TASKING provides a GUI tool called testIDEA*, enabling testers and developers to create and run tests without programming. However, test automation and advanced functionality require scripting.

Testing examples are shown in this manual and bundled with SDKs. They provide a good starting point, and test automation scripts can also be generated with testIDEA. See command: Tools | Generate Test Script

Classes overview

The winIDEA test SDK consists of two main groups of classes, shown in the class diagram below.

The first group of classes, with main class isys::CTestSpecification, contains data classes. These contain data for test execution, such as the function name to test, function parameter values, and expected return values. They can also parse test data written in YAML and emit test case specifications to an output stream.

Getters in these classes have an additional bool parameter isConst. If the returned object is needed for reading only, specify this value as true. If you intend to modify data, specify it as false. Background: Getters return an empty object instead of a null reference when the requested item is not specified and iConst is set to true. To save memory, this empty object is not stored in the object hierarchy and is deleted when no longer needed.

The second group, with main class isys::CTestCase, contains test execution logic. Java and Python have specific implementations of isys::CTestCase called JTestCase and PTestCase. These provide the ability to execute script methods specified in test specifications. The isys::CTestCase class can be used from other languages, but script extension methods cannot be used in that case.

winIDEA Test Class Diagram

Python Examples

Python examples for the winIDEA test SDK are found in the Python SDK. This document contains the following examples: