Functional Testing

CQTest

Loading levels

AddWaitUntilLoadedCommand is async. You need to wait until itโ€™s done in the test.

TestCommandBuilder.StartWhen([this] { return nullptr != spawner->FindFirstPlayerPawn(); })

Asserts in Untl

ASSERT_THAT expands into a return; so itโ€™s not great for TestCommandBuilder.Until.

I recommend calling the assert functions directly:

if (n_ids < 1) {
    Assert.Fail(TEXT("n_ids < 1"));
    return true;
}

The assert functions are in: \Engine\Source\Developer\CQTest\Public\Assert\NoDiscardAsserter.h