Configuring a Testing Environment

With the Component Tester, you can create a ready-to-use environment for testing purposes. It allows multiple ways to test the application execution.

Based on the specified generation parameters, it can be used to:

  • Facilitate application development following code generation from a UML architecture
  • Support testing activities during software development.


Before you begin:
  1. From the Test section in the diagram palette, drop the Component Tester configuration to the diagram viewer.
  2. Add a title to the configuration.
  3. From the Containment tree or from the diagram viewer, drop the code generation configuration to the title of the configuration.

  4. Optional: If MinGW is selected as the toolchain and no compiler is defined, a warning message indicates that you must define one. Double-click the configuration to modify its specifications. See Defining Specification Properties.

    Important: For launching the Component Tester operation, three Modes statuses are available:

    Mode Description
    Compilation Select the Compilation mode to launch the compilation only.

    To launch it locally, define the compiler installed on your machine in the Toolchain option. If no compiler is installed, you can run the operation on the cloud (define Execute on cloud = true).

    Generation Select the Generation mode to launch the code generation only (this does not need to be executed on the cloud nor requires a compiler).

    By default, the Generation mode is applied.

    Full Select Full to launch both the code generation and the compilation.

    To launch them locally, define the compiler installed on your machine in the Toolchain option. If no compiler is installed, you can run these operations on the cloud (define Execute on cloud = true).

  5. Run the operations. See Running the Operation.

    The generated files are available in the Files tab. For more information about the operation result, see About Component Tester Generator.

  6. Optional: From the Files tab, right-click the Tester node and select Open with VS Code for further actions with the generated code.

    Note:

    Opening files with VS Code works only if you specify the value of the configuration parameter ide to vscode and have VS Code installed on your machine.