Add test index to error messages