When running vendor/bin/codecept run wpunit I see information in the terminal that either codeception or wpbrowser is creating an "isolated installation" each time. This adds about 10 seconds to each test run.
Is there any way to persist the install for the entire wpunit test suite? I believe I can do any necessary database resets within a test classes tearDown() function so a fresh wordpress install each time feels unnecessary. especially when wordpress core is not modified (only themes / plugins are)
Unfortunately that's necessary to set up the install each time. However, it shouldn't take long. Here I can run a small integration suite in less than 3 seconds.
Are you running your tests inside a Docker container? Do you have the latest version of wp-browser installed and a decent version of PHP (7+)?
Latest wpbrowser and php yes, no to the docker container. I'm on Lubuntu 18.04, it takes my computer about 10 seconds
How many tests are you running inside that 10 seconds time frame?
The tests take another 5 seconds I think. Only 1 or 2 right now
As a bottom line, you should aim for a 2~4 seconds when running no tests at all - only having it set up the environment. Of course, without too many activePlugins, which could increase that time a bit.
Each test should take less than 0.5 second.