Ark Server API (ASA) - Wiki
|
#include "CoreTypes.h"
#include "Async/Async.h"
#include "Async/Future.h"
#include "Containers/Array.h"
#include "Containers/Map.h"
#include "Containers/Queue.h"
#include "Containers/Set.h"
#include "Containers/UnrealString.h"
#include "Delegates/Delegate.h"
#include "Delegates/DelegateBase.h"
#include "Delegates/DelegateInstancesImpl.h"
#include "Delegates/IDelegateInstance.h"
#include "GenericPlatform/GenericPlatformStackWalk.h"
#include "HAL/CriticalSection.h"
#include "HAL/LowLevelMemTracker.h"
#include "HAL/PlatformProcess.h"
#include "HAL/PlatformStackWalk.h"
#include "HAL/PlatformTime.h"
#include "HAL/ThreadSafeBool.h"
#include "Internationalization/Regex.h"
#include "Logging/LogVerbosity.h"
#include "Math/Color.h"
#include "Math/MathFwd.h"
#include "Math/Rotator.h"
#include "Math/UnrealMathUtility.h"
#include "Math/Vector.h"
#include "Misc/AssertionMacros.h"
#include "Misc/AutomationEvent.h"
#include "Misc/Build.h"
#include "Misc/Char.h"
#include "Misc/CString.h"
#include "Misc/DateTime.h"
#include "Misc/FeedbackContext.h"
#include "Misc/Guid.h"
#include "Misc/Optional.h"
#include "Misc/OutputDevice.h"
#include "Misc/Timespan.h"
#include "Templates/Function.h"
#include "Templates/SharedPointer.h"
#include "Templates/UnrealTemplate.h"
#include "UObject/NameTypes.h"
#include <atomic>
Go to the source code of this file.
Namespaces | |
Enumerations | |
enum | EAutomationExpectedMessageFlags::MatchType { EAutomationExpectedMessageFlags::Exact , EAutomationExpectedMessageFlags::Contains } |
enum class | EAutomationComparisonToleranceLevel : uint8 { Zero = 0x0 , Low = 0x1 , Medium = 0x2 , High = 0x3 , Zero , Low , Medium , High } |
#define ADD_LATENT_AUTOMATION_COMMAND | ( | ClassDeclaration | ) | FAutomationTestFramework::Get().EnqueueLatentCommand(MakeShareable(new ClassDeclaration)); |
Definition at line 3230 of file AutomationTest.h.
#define BEGIN_DEFINE_SPEC | ( | TClass, | |
PrettyName, | |||
TFlags ) BEGIN_DEFINE_SPEC_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3513 of file AutomationTest.h.
#define BEGIN_DEFINE_SPEC_PRIVATE | ( | TClass, | |
PrettyName, | |||
TFlags, | |||
FileName, | |||
LineNumber ) |
Definition at line 3403 of file AutomationTest.h.
#define DEFINE_ENGINE_LATENT_AUTOMATION_COMMAND | ( | CommandName | ) | DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND(ENGINE_API, CommandName) |
Definition at line 3138 of file AutomationTest.h.
#define DEFINE_ENGINE_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER | ( | CommandName, | |
ParamType, | |||
ParamName ) DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER(ENGINE_API, CommandName, ParamType, ParamName) |
Definition at line 3141 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND | ( | EXPORT_API, | |
CommandName ) |
Definition at line 3099 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER | ( | EXPORT_API, | |
CommandName, | |||
ParamType, | |||
ParamName ) |
Definition at line 3108 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_TWO_PARAMETER | ( | EXPORT_API, | |
CommandName, | |||
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1 ) |
Definition at line 3122 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES | ( | EXPORT_API, | |
CommandName, | |||
RetryCount, | |||
WaitTimeBetweenRuns ) |
Definition at line 3144 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_FOUR_PARAMETERS | ( | EXPORT_API, | |
CommandName, | |||
RetryCount, | |||
WaitTimeBetweenRuns, | |||
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1, | |||
ParamType2, | |||
ParamName2, | |||
ParamType3, | |||
ParamName3 ) |
Definition at line 3208 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_ONE_PARAMETER | ( | EXPORT_API, | |
CommandName, | |||
RetryCount, | |||
WaitTimeBetweenRuns, | |||
ParamType, | |||
ParamName ) |
Definition at line 3157 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_THREE_PARAMETERS | ( | EXPORT_API, | |
CommandName, | |||
RetryCount, | |||
WaitTimeBetweenRuns, | |||
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1, | |||
ParamType2, | |||
ParamName2 ) |
Definition at line 3189 of file AutomationTest.h.
#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_TWO_PARAMETERS | ( | EXPORT_API, | |
CommandName, | |||
RetryCount, | |||
WaitTimeBetweenRuns, | |||
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1 ) |
Definition at line 3172 of file AutomationTest.h.
#define DEFINE_LATENT_AUTOMATION_COMMAND | ( | CommandName | ) |
Definition at line 3000 of file AutomationTest.h.
#define DEFINE_LATENT_AUTOMATION_COMMAND_FIVE_PARAMETER | ( | CommandName, | |
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1, | |||
ParamType2, | |||
ParamName2, | |||
ParamType3, | |||
ParamName3, | |||
ParamType4, | |||
ParamName4 ) |
Definition at line 3077 of file AutomationTest.h.
#define DEFINE_LATENT_AUTOMATION_COMMAND_FOUR_PARAMETER | ( | CommandName, | |
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1, | |||
ParamType2, | |||
ParamName2, | |||
ParamType3, | |||
ParamName3 ) |
Definition at line 3057 of file AutomationTest.h.
#define DEFINE_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER | ( | CommandName, | |
ParamType, | |||
ParamName ) |
Definition at line 3009 of file AutomationTest.h.
#define DEFINE_LATENT_AUTOMATION_COMMAND_THREE_PARAMETER | ( | CommandName, | |
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1, | |||
ParamType2, | |||
ParamName2 ) |
Definition at line 3039 of file AutomationTest.h.
#define DEFINE_LATENT_AUTOMATION_COMMAND_TWO_PARAMETER | ( | CommandName, | |
ParamType0, | |||
ParamName0, | |||
ParamType1, | |||
ParamName1 ) |
Definition at line 3023 of file AutomationTest.h.
#define DEFINE_SPEC | ( | TClass, | |
PrettyName, | |||
TFlags ) DEFINE_SPEC_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3511 of file AutomationTest.h.
#define DEFINE_SPEC_PRIVATE | ( | TClass, | |
PrettyName, | |||
TFlags, | |||
FileName, | |||
LineNumber ) |
Definition at line 3376 of file AutomationTest.h.
Definition at line 3515 of file AutomationTest.h.
#define END_NETWORK_AUTOMATION_COMMAND | ( | ClassDeclaration, | |
InRoleIndex ) |
Definition at line 3246 of file AutomationTest.h.
#define IMPLEMENT_BDD_AUTOMATION_TEST | ( | TClass, | |
PrettyName, | |||
TFlags ) IMPLEMENT_BDD_AUTOMATION_TEST_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3509 of file AutomationTest.h.
#define IMPLEMENT_BDD_AUTOMATION_TEST_PRIVATE | ( | TClass, | |
PrettyName, | |||
TFlags, | |||
FileName, | |||
LineNumber ) |
Definition at line 3349 of file AutomationTest.h.
#define IMPLEMENT_COMPLEX_AUTOMATION_TEST | ( | TClass, | |
PrettyName, | |||
TFlags ) IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3500 of file AutomationTest.h.
#define IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE | ( | TClass, | |
TBaseClass, | |||
PrettyName, | |||
TFlags, | |||
FileName, | |||
LineNumber ) |
Definition at line 3294 of file AutomationTest.h.
#define IMPLEMENT_CUSTOM_COMPLEX_AUTOMATION_TEST | ( | TClass, | |
TBaseClass, | |||
PrettyName, | |||
TFlags ) IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3507 of file AutomationTest.h.
#define IMPLEMENT_CUSTOM_SIMPLE_AUTOMATION_TEST | ( | TClass, | |
TBaseClass, | |||
PrettyName, | |||
TFlags ) IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3505 of file AutomationTest.h.
#define IMPLEMENT_NETWORKED_AUTOMATION_TEST | ( | TClass, | |
PrettyName, | |||
TFlags, | |||
NumParticipants ) IMPLEMENT_NETWORKED_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, NumParticipants, __FILE__, __LINE__) |
Definition at line 3502 of file AutomationTest.h.
#define IMPLEMENT_NETWORKED_AUTOMATION_TEST_PRIVATE | ( | TClass, | |
TBaseClass, | |||
PrettyName, | |||
TFlags, | |||
NumParticipants, | |||
FileName, | |||
LineNumber ) |
Definition at line 3320 of file AutomationTest.h.
#define IMPLEMENT_SIMPLE_AUTOMATION_TEST | ( | TClass, | |
PrettyName, | |||
TFlags ) IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__) |
Definition at line 3498 of file AutomationTest.h.
#define IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE | ( | TClass, | |
TBaseClass, | |||
PrettyName, | |||
TFlags, | |||
FileName, | |||
LineNumber ) |
Macros to simplify the creation of new automation tests. To create a new test one simply must put IMPLEMENT_SIMPLE_AUTOMATION_TEST( NewAutomationClassName, AutomationClassFlags ) IMPLEMENT_COMPLEX_AUTOMATION_TEST( NewAutomationClassName, AutomationClassFlags ) in their cpp file, and then proceed to write an implementation for: bool NewAutomationTestClassName::RunTest() {} While the macro could also have allowed the code to be specified, leaving it out of the macro allows the code to be debugged more easily.
Builds supporting automation tests will automatically create and register an instance of the automation test within the automation test framework as a result of the macro.
Definition at line 3262 of file AutomationTest.h.
#define SAFE_GETSTACK | ( | VariableName, | |
IgnoreCount, | |||
MaxDepth ) |
Call GetStack, with a guarantee of a non-empty return; a placeholder "Unknown",1) is used if necessary
Definition at line 58 of file AutomationTest.h.
#define START_NETWORK_AUTOMATION_COMMAND | ( | ClassDeclaration | ) |
Definition at line 3234 of file AutomationTest.h.
#define TestTrueExpr | ( | Expression | ) | TestTrue(TEXT(#Expression), Expression) |
Macro version of above, uses the passed in expression as the description as well
Definition at line 1846 of file AutomationTest.h.
Macros to make it easy to test state with one-liners: they will run the appropriate test method and, if the test fail, with execute return false;
, which (if placed in the main test case method) will stop the test immediately.
The error logging is already handled by the test method being called.
As a result, you can easily test things that, if wrong, would potentially crash the test:
bool FMyEasyTest::RunTest(const FString& Parameters) { TArray<float> Data = GetSomeData(); int32 Index = GetSomeIndex(); UTEST_TRUE("Check valid index", Index < Data.Num()); float DataItem = Data[Index]; // Won't crash, the test exited on the previous // line if index was invalid. UTEST_TRUE("Check valid item", DataItem > 0.f); }
Definition at line 3547 of file AutomationTest.h.
Definition at line 3559 of file AutomationTest.h.
Definition at line 3589 of file AutomationTest.h.
#define UTEST_INVALID | ( | What, | |
SharedPointer ) |
Definition at line 3601 of file AutomationTest.h.
Definition at line 3565 of file AutomationTest.h.
Definition at line 3613 of file AutomationTest.h.
Definition at line 3577 of file AutomationTest.h.
Definition at line 3607 of file AutomationTest.h.
Definition at line 3571 of file AutomationTest.h.
Definition at line 3583 of file AutomationTest.h.
#define UTEST_VALID | ( | What, | |
SharedPointer ) |
Definition at line 3595 of file AutomationTest.h.
#define WITH_AUTOMATION_TESTS (WITH_DEV_AUTOMATION_TESTS || WITH_PERF_AUTOMATION_TESTS) |
Definition at line 54 of file AutomationTest.h.
Enumerator | |
---|---|
Zero | |
Low | |
Medium | |
High | |
Zero | |
Low | |
Medium | |
High |
Definition at line 739 of file AutomationTest.h.
DECLARE_DELEGATE | ( | FDoneDelegate | ) |
DECLARE_DELEGATE_ThreeParams | ( | FOnTestScreenshotAndTraceCaptured | , |
const TArray< FColor > & | , | ||
const TArray< uint8 > & | , | ||
const FAutomationScreenshotData & | ) |
DECLARE_DELEGATE_TwoParams | ( | FOnTestScreenshotCaptured | , |
const TArray< FColor > & | , | ||
const FAutomationScreenshotData & | ) |
Delegate type for when a test screenshot has been captured
The first parameter is the array of the raw color data. The second parameter is the image metadata.
DECLARE_MULTICAST_DELEGATE_OneParam | ( | FOnTestEvent | , |
FAutomationTestBase * | ) |
DECLARE_MULTICAST_DELEGATE_OneParam | ( | FOnTestScreenshotComparisonComplete | , |
const FAutomationScreenshotCompareResults & | ) |
DECLARE_MULTICAST_DELEGATE_TwoParams | ( | FOnPerformanceDataRetrieved | , |
bool | , | ||
const FString & | ) |
DECLARE_MULTICAST_DELEGATE_TwoParams | ( | FOnTestDataRetrieved | , |
bool | , | ||
const FString & | ) |
DEFINE_LOG_CATEGORY_STATIC | ( | LogLatentCommands | , |
Log | , | ||
All | ) |