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

相关推荐
福楠11 小时前
C++ STL | map、multimap
c语言·开发语言·数据结构·c++·算法
Sarvartha11 小时前
二分查找学习笔记
数据结构·c++·算法
daidaidaiyu12 小时前
一文入门 Android NDK 开发
c++
Ethernet_Comm12 小时前
从 C 转向 C++ 的过程
c语言·开发语言·c++
难得的我们12 小时前
C++与区块链智能合约
开发语言·c++·算法
diediedei12 小时前
C++编译期正则表达式
开发语言·c++·算法
Tianwen_Burning13 小时前
c++ release下的debug
c++
谦宸、墨白13 小时前
从零开始学C++:二叉树进阶
开发语言·数据结构·c++
Howrun77714 小时前
C++ 文件操作全知识点详细讲解
c++
m0_7482486516 小时前
C++使用HTTP库和框架轻松发送HTTP请求
开发语言·c++·http