Extract test load code