Files
UnrealEngineUWP/Engine/Source/Developer/FunctionalTesting/Private/FunctionalTestingHelper.cpp
ryan durand 471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00

67 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "FunctionalTestingHelper.h"
#include "FunctionalTestingModule.h"
bool FWaitForFTestsToFinish::Update()
{
return IFunctionalTestingModule::Get().IsRunning() == false;
}
bool FTriggerFTests::Update()
{
IFunctionalTestingModule& Module = IFunctionalTestingModule::Get();
if (Module.IsFinished())
{
// if tests have been already triggered by level script just make sure it's not looping
if (Module.IsRunning())
{
Module.SetLooping(false);
}
else
{
Module.RunAllTestsOnMap(false, false);
}
}
return true;
}
bool FTriggerFTest::Update()
{
IFunctionalTestingModule& Module = IFunctionalTestingModule::Get();
if (Module.IsFinished())
{
// if tests have been already triggered by level script just make sure it's not looping
if (Module.IsRunning())
{
IFunctionalTestingModule::Get().SetLooping(false);
}
else
{
IFunctionalTestingModule::Get().RunTestOnMap(TestName, false, false);
}
}
return true;
}
bool FStartFTestsOnMap::Update()
{
// This should now be handled by your IsReady override of the functional test.
//should really be wait until the map is properly loaded....in PIE or gameplay....
//ADD_LATENT_AUTOMATION_COMMAND(FWaitLatentCommand(15.f));
ADD_LATENT_AUTOMATION_COMMAND(FTriggerFTests);
ADD_LATENT_AUTOMATION_COMMAND(FWaitForFTestsToFinish);
return true;
}
bool FStartFTestOnMap::Update()
{
ADD_LATENT_AUTOMATION_COMMAND(FTriggerFTest(TestName));
ADD_LATENT_AUTOMATION_COMMAND(FWaitForFTestsToFinish);
return true;
}