2019-12-26 15:32:37 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2016-11-23 15:48:37 -05:00
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "Modules/ModuleInterface.h"
|
|
|
|
|
#include "Modules/ModuleManager.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2021-02-18 18:13:28 -04:00
|
|
|
FUNCTIONALTESTING_API DECLARE_LOG_CATEGORY_EXTERN(LogFunctionalTest, Log, All);
|
2017-08-11 12:43:42 -04:00
|
|
|
|
|
|
|
|
class IFunctionalTestingModule : public IModuleInterface
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2017-08-11 12:43:42 -04:00
|
|
|
/** Triggers in sequence all functional tests found on the level */
|
|
|
|
|
virtual void RunAllTestsOnMap(bool bClearLog, bool bRunLooped) = 0;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2017-08-11 12:43:42 -04:00
|
|
|
/** Runs a single test */
|
|
|
|
|
virtual void RunTestOnMap(const FString& TestName, bool bClearLog, bool bRunLooped) = 0;
|
|
|
|
|
|
|
|
|
|
/** Sets that a test is being started */
|
|
|
|
|
virtual void MarkPendingActivation() = 0;
|
|
|
|
|
|
|
|
|
|
/** True if a test is about to start */
|
|
|
|
|
virtual bool IsActivationPending() const = 0;
|
|
|
|
|
|
|
|
|
|
/** True if there is an active UFunctionalTestingManager */
|
|
|
|
|
virtual bool IsRunning() const = 0;
|
|
|
|
|
|
|
|
|
|
/** True if a UFunctionalTestingManager was spawned and is now done */
|
|
|
|
|
virtual bool IsFinished() const = 0;
|
|
|
|
|
|
|
|
|
|
/** Sets the active testing manager */
|
|
|
|
|
virtual void SetManager(class UFunctionalTestingManager* NewManager) = 0;
|
|
|
|
|
|
2022-06-23 11:14:07 -04:00
|
|
|
/** Gets the active testing manager */
|
2017-08-11 12:43:42 -04:00
|
|
|
virtual class UFunctionalTestingManager* GetCurrentManager() = 0;
|
|
|
|
|
|
|
|
|
|
/** If true, will run tests forever */
|
|
|
|
|
virtual void SetLooping(const bool bLoop) = 0;
|
|
|
|
|
|
|
|
|
|
/** Gets a list of maps/tests in the current project */
|
|
|
|
|
virtual void GetMapTests(bool bEditorOnlyTests, TArray<FString>& OutBeautifiedNames, TArray<FString>& OutTestCommands, TArray<FString>& OutTestMapAssets) const = 0;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/** Gets the debugger singleton or returns NULL */
|
2017-08-11 12:43:42 -04:00
|
|
|
static IFunctionalTestingModule& Get()
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2017-08-11 12:43:42 -04:00
|
|
|
static const FName FunctionalTesting(TEXT("FunctionalTesting"));
|
|
|
|
|
return FModuleManager::Get().LoadModuleChecked<IFunctionalTestingModule>(FunctionalTesting);
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
};
|