- Qt Creator Documentation
- Add tests to existing test projects
- Qt Creator 20.0.0

Testing ◦ Apply filters before scanning for tests

# Add tests to existing test projects

To add a new file that has test cases to a project that contains a test project:

1. Go to File > New File.
2. Select Test Case > Choose.
3. In Test framework, select the test framework in use. This has to match the test framework you are using inside the project you want to add this file to.

The settings to specify depend on the selected test framework.

Note: This is only supported for code based test frameworks, except for Qt Tests. There is no official support for having multiple test cases inside a single Qt test application, and it is better to create a separate test sub project for each test case.

See also How to: Test and Testing.