Factorize out some stuff from EffectChainTester::run().