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

相关推荐
2301_793804692 小时前
C++中的适配器模式变体
开发语言·c++·算法
旖-旎3 小时前
二分查找(1)
c++·算法·二分查找·力扣·双指针
tankeven4 小时前
HJ132 小红走网格
c++·算法
2401_857865234 小时前
C++模块接口设计
开发语言·c++·算法
add45a5 小时前
嵌入式C++低功耗设计
开发语言·c++·算法
2401_874732535 小时前
C++中的状态模式
开发语言·c++·算法
闻缺陷则喜何志丹5 小时前
【枚举】P6786「SWTR-6」GCDs & LCMs|普及+
c++·算法·洛谷
m0_716667075 小时前
实时数据压缩库
开发语言·c++·算法
dapeng28705 小时前
多协议网络库设计
开发语言·c++·算法
阿猿收手吧!6 小时前
【C++】建造者与代理模式实战解析
开发语言·c++·代理模式