Add set state for test errors