A glass marking pencil in engineering testing laboratories is used to write on glass surfaces like beakers, slides, or sample containers. It helps in labeling samples clearly and durably without smudging, ensuring proper identification during testing.