When they do a test for melanoma?

Unclear questions. We all need to watch for pigmented skin lesions. If there is a change in size, shape, nodule formation, bleeding, change in color, the lesion needs to be evaluated by a doctor. Diagnsis requires removal of the lesion and examination of the tissue by a pathologist.
Suspicious mole. Generally a test (biopsy) is done for melanoma when a skin mole is considered suspicious by a dermatologist or other physician.