API on test function