博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Unreal engine 4 Automation Test
阅读量:2437 次
发布时间:2019-05-10

本文共 2157 字,大约阅读时间需要 7 分钟。

Unreal engine 4 support automation test in UE4 editor.

 

Following is detail information from UE4 documentation.

Automation System Overview: 

 

For example, we need add an automation test to check all texture size and mipmap level.

Let's finish it step by step.

 

Step 1: Add a new complex automation test

/**

* CheckAllTextureSizeAndMipmapTest
* Verification automation test to make sure all texture size in sepecial rang and with mipmap.
*/
IMPLEMENT_COMPLEX_AUTOMATION_TEST(FCheckAllTextureSizeAndMipmapTest"Project.Textures.CheckAllTexture", EAutomationTestFlags::ApplicationContextMask | EAutomationTestFlags::ProductFilter)

 

/**

* Requests a enumeration of all textures to check
*/
void FCheckAllTextureSizeAndMipmapTest::GetTests(TArray<FString>& OutBeautifiedNames, TArray <FString>& OutTestCommands) const
{

    //Fill OutBeautifiedNames and OutTestCommands. if there's nothing added, then no any test case show in UE4 editor.

    ...

        OutBeautifiedNames.Add(BeautifiedFilename);

        OutTestCommands.Add(Asset.ObjectPath.ToString());

    ...

}

 

/**

* Execute texture checking on each texture( one texture as one test case ).
*
* @param Parameters - Full texture path to test.
* @return TRUE if the test was successful, FALSE otherwise
*/
bool FCheckAllTextureSizeAndMipmapTest::RunTest(const FString& Parameters)
{

    bool IsPassTest = true;

    ...

    return IsPassTest;

}

 

Step 2: Check it in UE4 Editor

Compile whole project and restart UE4 editor. Open 'Session Fronted' dialog by UE4 editor menu ( 'Window' →  'Developer Tools' → 'Session Fronted').

Double click left panel to select local machine Editor. In top-right, do, select 'Automation' tab. You can find new added automation test 'Project.Textures.CheckAllTexture'. After select some test case, you can start tests by click 'Start Tests' button on the top-right area.

 

Step 3: Run in Teamcity/Bamboo

Automation test can be run from command or power shell script.

"..\..\..\Engine\Binaries\Win64\$ProcessName.exe" %~dp0\..\..\..\Projects\Gunjack\Gunjack.uproject -execcmds="Automation RunTests Project.Textures.CheckAllTexture;Quit" -unattended -nopause -testexit="Automation Test Queue Empty" -log=AutomationTextureLog.log

转载地址:http://yewqb.baihongyu.com/

你可能感兴趣的文章
XML加ASP实现网页“本地化” (转)
查看>>
Java中的异步网络编程 (转)
查看>>
用于核心模式驱动程序的网络体系结构(1) (转)
查看>>
More Effective C++ 条款20 (转)
查看>>
一个程序员的爱恋 (转)
查看>>
足球战术->边锋之Decorator篇 (转)
查看>>
编写优质无错代码(1) (转)
查看>>
在VC中调用WORD(显示,修改,存盘,运行宏)之二去掉word的常用,格式工具栏 (转)...
查看>>
MySQL 4.1.0 中文参考手册 --- 6.3 用于 SELECT 和 WHERE 子句的函数 (1) (转)
查看>>
vs.net beta 2中利用DataGrid分页详解 (转)
查看>>
Process-Display-Process (PDP) pattern (转)
查看>>
基于构件复用的软件方法与COM支持 (转)
查看>>
DELPHI中使用API函数详解 (转)
查看>>
Single Entry Point to EJB Layer (转)
查看>>
InsideJVM(3)--Method area(方法区) (转)
查看>>
中文版Windows XP 的新增功能(转)
查看>>
Web Application 開 發 利 器 - WebSnap(三) (转)
查看>>
跟我学 安装Windows Vista Bata2实录(转)
查看>>
Windows Vista IIS 7.0开启方法(转)
查看>>
Windows Vista六大版本详细介绍(转)
查看>>