VectorCAST Setup Teardown Scripts


Is there a way to prepare my compiler, target and/or environment variable before testing in VectorCAST?


Yes, it is often necessary to do some preparatory tasks before running the tests for a VectorCAST environment. These tasks may include starting a target server, setting environment variables, starting simulators, etc. Furthermore, after the environment test-runs, it may be necessary to perform some cleanup tasks. These cleanup tasks may include killing processes, cleaning up files, etc.

See also this video tutorial.

VectorCAST/Manage Projects now contain a script in the <PROJECT_DIRECTORY>/python directory called This script is run when a project is loaded and is used to map the compiler node names within a project to Python classes that contain setup and teardown members.

  1. Access the Setup/Teardown script in Project | Edit Setup/Teardown

  2. In the script, locate class Target and add in what your testing requires in def setup for preparatory tasks and def teardown for cleanup tasks.

    The following example would print Testing setup and Testing teardown during invocation of the setup/teardown when building and executing environments as well as when creating environments.

Article ID: 1370
Last updated: 2019-10-02
Revision: 3
VectorCAST -> New Features from 2018 -> VectorCAST Setup Teardown Scripts