# CTest 应用程序

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

> **TL;DR**
> `运行 | 编辑配置 |`  ![添加新配置](https://resources.jetbrains.com/help/img/idea/2026.3/workspace.xml` 。     |

## 配置选项卡

|  项  |  描述  |
| --- | --- |
|  要运行的测试列表  |  要运行特定测试，请指定它们的名称，并用逗号分隔。 或者，点击字段旁边的图标，从列表中选择所需的测试：   ![CTest 应用程序中可用测试的列表](https://resources.jetbrains.com/help/img/idea/2026.3/cl_ctest_config_testlist.png)  |
|  要构建的目标  |     从列表中选择目标。 目标类型使用以下图标标记：       ![所有目标](https://resources.jetbrains.com/help/img/idea/2026.3/app.nodes.target.svg) -   所有目标         ![可执行文件](https://resources.jetbrains.com/help/img/idea/2026.3/clion-cmake.icons.CMakeTarget_Executable.svg) -   可执行文件         ![目标库](https://resources.jetbrains.com/help/img/idea/2026.3/app.objectBrowser.showLibraryContents.svg) -   库       |
|  CTest 参数  |     在此字段中，输入要传递的参数列表，格式与您在命令行中使用的格式相同。 如有必要，点击 ![“展开”按钮](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.expandComponent.svg) 按钮并输入所需的参数。       点击 ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.add_dark.svg)以打开   宏  对话框。 您还可以在此字段中使用 [path variables](absolute-path-variables.html)。     |
|    工作目录    |     指定用于运行应用程序的工作目录。 此目录是所有相对输入和输出路径的起点。 默认情况下，该字段包含项目文件所在的目录。 要指定另一个目录，请点击 ![“浏览”按钮](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.inline.browse.svg)并选择该目录。       点击 ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.add_dark.svg)以打开   宏  对话框。 您还可以在此字段中使用 [path variables](absolute-path-variables.html)。     |
|  环境变量  |  创建环境变量并指定其值。 有关更多信息，请参阅 [Adding environment variables](run-debug-configuration.html#envvars-progargs)。  |
|  以管理员权限运行 / 以 root 权限运行  |  选中此复选框以使用 root 权限启动配置。 欲了解更多信息，请参阅 [以 root 身份调试](debug-as-root.html)。  |

