practices for writing test codes