要运行项目中的所有测试,请为目录创建运行/调试配置。点击 Run | Edit Configurations。单击 Add New Configuration 按钮 ,然后选择 Go Test。在 Directory 字段中,指定包含应用程序和测试文件的目录的路径。确保 Test kind 是 Directory。点击 Apply 和 OK。
要运行创建的配置,请点击 Run | <go_test_configuration_name>。