As of v0.18.1 I can use `test_bitcoin-qt -platform cocoa` to run GUI tests; this opens and closes a regtest GUI a bunch of times.

As of master (6e4f6553913978fcdddba30e0bb6f97edcb12e80) it seems to ignore the `-platform cocoa` and just run the test as with `minimal`.

As seen on macOS 10.14.6. Git bisect blames a2714a5c69f0b0506689af04c3e785f71ee0915d in #16578 `Do not pass in command line arguments to QApplication` (@achow101, @ryanofsky)
m_app.requestShutdown();
    m_app.exec();
    
    AbortShutdown();
    UnloadBlockIndex();
}
void AppTests::guiTests(BitcoinGUI* window)
{
    HandleCallback callback{"guiTests", *this};
    connect(window, &BitcoinGUI::consoleShown, this, &AppTests::consoleTests);
    expectCallback("consoleTests");
    QAction* action = window->findChild<QAction*>("openRPCConsoleAction");
    action->activate(QAction::Trigger);
}
void AppTests::consoleTests(RPCConsole* console)
{
    HandleCallback callback{"consoleTests", *this};
    TestRpcCommand(console);
}
AppTests::HandleCallback::~HandleCallback()
{
    auto& callbacks = m_app_tests.m_callbacks;
    auto it = callbacks.find(m_callback);
    assert(it != callbacks.end());
    callbacks.erase(it);
    if (callbacks.empty()) {
        m_app_tests.m_app.quit();
    }
}