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

相关推荐
wangluoqi24 分钟前
c++ 逆元 小总结
开发语言·c++
瓦特what?29 分钟前
插 入 排 序
开发语言·c++
『往事』&白驹过隙;39 分钟前
C/C++中的格式化输出与输入snprintf&sscanf
linux·c语言·c++·笔记·学习·iot·系统调用
Je1lyfish42 分钟前
CMU15-445 (2026 Spring) Project#1 - Buffer Pool Manager
linux·数据库·c++·后端·链表·课程设计·数据库架构
zyeyeye1 小时前
自定义类型:结构体
c语言·开发语言·数据结构·c++·算法
俩娃妈教编程1 小时前
2023 年 03 月 二级真题(1)--画三角形
c++·算法·双层循环
航哥的女人2 小时前
C++文件操作
开发语言·c++
L_Aria2 小时前
3824. 【NOIP2014模拟9.9】渴
c++·算法·图论
ShineWinsu3 小时前
对于模拟实现C++list类的详细解析—上
开发语言·数据结构·c++·算法·面试·stl·list
Mr YiRan3 小时前
C++语言类中各个重要函数原理
java·开发语言·c++