Testing values by tree