Thymus is an organ in body that controls the immune processes. The thymus processes a type of white blood cell known as a T-lymphocyte. These T-lymphocytes govern cellular immunity, which means that they help cells recognise and destroy invading bacteria, viruses, abnormal cell growth such as cancer, and foreign tissue. As a person grows, its role becomes less. There are no specific tests exclusively for thymus. One disease that is due to thymus gland is known as myasthenia gravis (muscle weakness on repetitive movements of the muscle); removing thymus in this disease helps a patient. If enlarged one can do imaging - using CT scan of chest / thymus area.
It will be better if this query is posed in context of some illness.