When testing C++ source code, you can use class code to create class objects. Since abstract classes cannot be instantiated, Controller Tester automatically generates instantiable class code.


  • On the left side of the [Class Factory view], you can see the classes included in the project and the class code for instantiating the class in a tree structure.
  • On the right side of the [Class Factory View], you can edit the class code and name in the [Class code] tab, and see the connected tests in the [Configuration] tab.

Toolbar menu of Class Factory view

Item Description
Save Save modification of the class code.
Expand All Expand all class tree in Class Factory view.
Collapse All Collapse all class tree in Class Factory view

Icon of Class Factory view

Icon Description
Class Class included in the project.
Class code Class code that create class objects to use in tests.

Context menu of class

Item Description
Create Create a class code of the selected class.

Context menu of class code

Item Description
Delete Delete selected class codes.

Create a class code

When analyze the project, a list of all class included in source codes appears in Class Factory view. Controller Tester automatically generates class codes of abstract classes. You can also manually create class code from the context menu of class.

Apply class code

There are three ways to apply the class code to test.

Apply in Test Editor

  1. Open the test editor by double-clicking on the test that you want to apply the class code. In the [Test Info] tab, expand the test structure, select the object to which the class code is to be applied, and select [Use class code] in [Test Info Edit] – [Constructor] on the right.
  1. Select class code in [Test Structure]. In [Test Info Edit], check the class code to be applied and save. Select the class code to see the code.
    • Select [Go to Class Factory] to open the class code in Class Factory view.
    • Click [Add Class code] to add new class code.

Apply by drag-and-drop

You can apply the class code by dragging and dropping the class code to be applied from Class Factory view to the class object in Test Editor.

Apply using context menu in Test view

  1. In Test view, select [Apply Class code] in context menu of functions or tests.
  1. In [Apply Class code] dialog, select the class code to apply to selected tests and click [Ok]. Expand [Class code] at bottom to see the selected class code.

Modify class code

You can modify the class code on [Class code] tab of Class Factory view. The modified class code is reflected in all connected tests.

Delete class code

You can delete class code in context menu of Class Factory view.

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.