Reading samples Optimization of testing costs