There is no specified test for Insomnia. Various tools may be used by doctors to detect Insomnia like performing a blood test, asking a few questions, etc.