The Beilstein test detects halogens. An organic compound is heated with copper oxide; if a halogen is present, a volatile cuprous halide is formed, which imparts a characteristic blue-green color to the flame.