Refine Test Framework