Files
UnrealEngineUWP/Engine/Source/Developer/FunctionalTesting/Private/FunctionalTestingHelper.cpp
Ryan Vance 7c51ff94af Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR)
CL 1 of 8
#rb integration

[CL 4748712 by Ryan Vance in Dev-VR branch]
2019-01-17 18:54:05 -05:00

67 lines
1.5 KiB
C++

// Copyright 1998-2019 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;
}