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

相关推荐
liulilittle1 天前
FileStream C++
开发语言·c++·cocoa
Gomiko1 天前
C/C++基础(五):分支
c语言·c++
点PY1 天前
C++ 中 std::async 和 std::future 的并发性
java·开发语言·c++
不会代码的小猴1 天前
C++的第九天笔记
开发语言·c++·笔记
fqbqrr1 天前
2512C++,clangd支持模块
开发语言·c++
老王熬夜敲代码1 天前
C++中的thread
c++·笔记·面试
qq_479875431 天前
C++ 鸭子类型” (Duck Typing)
开发语言·c++
崇山峻岭之间1 天前
C++ Prime Plus 学习笔记033
c++·笔记·学习
暗然而日章1 天前
C++基础:Stanford CS106L学习笔记 7 类
c++·笔记·学习
im_AMBER1 天前
Leetcode 72 数组列表中的最大距离
c++·笔记·学习·算法·leetcode