17-ketosteroids (17-KS) test, a rarely used 24-hour urine test that is useful in diagnosing adrenocortical dysfunction. It is used to detect levels of 17-KS, which are metabolites of the testosterone and nontestosterone androgenic sex hormones secreted from the adrenal cortex and the testes.