you can use setUp()
method that triggered before any test begins.
but don not forget to call the parent setup
public function setUp(): void
{
parent::setUp();
Artisan::call('db:seed');
}
there is also tearDown()
function that triggered after test ended
CLICK HERE to find out more related problems solutions.