Create Boost tests | Qt Creator Documentation

- Qt Creator Documentation
- Create Boost tests
- Qt Creator 19.0.1

Connect to Squish Server ◦ Create CTest Based Tests

# Create Boost tests

To build and run Boost tests, install Boost.Test on the computer. Typically, the Boost installation includes it. Download Boost from Boost.org.

If the compiler and build system can find the Boost libraries, you do not need to specify the include directory when creating the test.

To create a Boost test:

1. Go to File > New Project > Test Project.
2. Select Boost Test Project > Choose to create a project with boilerplate code for a Boost test.
3. In the Project and Test Information dialog, specify settings for the project and test:

   1. In Test framework, select Boost Test (header only) to include needed headers, or Boost Test (shared libraries) to link against Boost Test.
   2. In Test suite name, enter a name for the test suite.
   3. In Test case name, enter a name for the test case.
   4. In Boost include directory (optional), enter the path to the directory that has files needed by Boost.Test, such as `version.hpp` and the `test` subfolder that contains the test header files.
   5. In Build system, select the build system to use for building the project: CMake, qmake, or Qbs.

Qt Creator creates the test in the project directory.

For more information about creating Boost tests, see Boost.Test.

Note: While scanning for tests, the parser takes into account only files that directly or indirectly include one of Boost's test library headers (any include starting with `boost/test/` and having the `.hpp` suffix). Files that currently will not be built will be ignored.

See also How To: Test, Select the build system, and Testing.

Connect to Squish Server ◦ Create CTest Based Tests