Adaptive threshold tests