The Blueprint Functional tests were designed to run with the same PIE session to optimize time execution.
It is possible to force the map to be reloaded each time but you will need to implement your own BP functional tests runner and uses AutomationCommon::AutomationLoadMap(<map name>, true /* forceReload */)
Another way do this is to force the PIE to close at the end of each test using the OnTestEndEvent callback:
You need to register the callback during a module startup (can be done through a plugin module)
FAutomationTestFramework::Get().OnTestEndEvent.AddRaw(this, &FTestSamplesModule::OnTestEnd);
and in the corresponding module shutdown
FAutomationTestFramework::Get().OnTestEndEvent.RemoveAll(this);
then
void FTestSamplesModule::OnTestEnd(FAutomationTestBase* Test) { if (Test != nullptr) { UE_LOG(LogTestSamples, Verbose, TEXT("Ending test: %s"), *Test->GetTestFullName()) // maybe detect if it is a test type that needs this action // Stop PIE when leaving functional tests IAutomationControllerManagerRef AutomationController = FModuleManager::LoadModuleChecked<IAutomationControllerModule>("AutomationController").GetAutomationController(); if (GUnrealEd && !AutomationController->KeepPIEOpen()) { GUnrealEd->RequestEndPlayMap(); } } }