Improve test support