UE 自定义的 Automated Tests 没有显示在会话前端 Session FrontEnd 的原因

在看大象无形,我直接拷贝它的代码的,但是我没有看到自定义的测试出现在会话前端

cpp 复制代码
#include "CoreMinimal.h"
#include "Misc/AutomationTest.h"
#include "Logging/LogMacros.h"

#include "TestModulePrivatePCH.h"

DEFINE_LOG_CATEGORY_STATIC(TestLog, Log, All);
IMPLEMENT_SIMPLE_AUTOMATION_TEST(FMultiThreadTest, "MyTest.PublicTest.MultiThreadTest", EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter)

bool FMultiThreadTest::RunTest(const FString& Parameters)
{
	UE_LOG(TestLog, Log, TEXT("FMultiThreadTest begin"));
	return true;
}

之后调好之后发现需要注意两个地方,一个是 UE 里面关于 Test 的插件需要都打开,第二个是需要确保你的定义自动测试的代码所在的模块是被 uproject 包含的

如果确实是被 uproject 包含的,但是仍然没有显示,可能是需要重新编译

可以用 UBT 重新编译

https://forums.unrealengine.com/t/generate-cpp-project-couldnt-find-unrealbuildtool/231288/15?page=3

相关推荐
独隅39 分钟前
CLion 接入 Codex 的完整配置使用全面指南
c++·ide·ai·c++23
老洋葱Mr_Onion1 小时前
【C++】高精度模板
开发语言·c++·算法
我不是懒洋洋2 小时前
从零实现一个分布式计算:MapReduce的核心设计
c++
小王C语言12 小时前
【7. 实现登录注册模块】:实现会话管理、注册/登录/退出 API
网络·c++
峥无15 小时前
C++11 深度详解:现代 C++ 基石全梳理
开发语言·c++·笔记
阿米亚波15 小时前
【C++ STL】std::unordered_multimap
开发语言·数据结构·c++·笔记·stl
小王C语言15 小时前
【3. 基于 Vibe Coding 的 OJ 平台】. 构建仓库、环境准备、需求梳理、安装依赖
网络·c++
小王C语言16 小时前
【8.进行接口测试】:通过 curl 进行接口自动化测试 / 通过 python 程序进行接口自动化测试
网络·c++
888CC++17 小时前
C++ 快速学习指南:从入门到进阶的实战路线
开发语言·c++
小小晓.17 小时前
C++记:函数
开发语言·c++·算法