A detection algorithm based on hypothesis testing strategy is presented for the detection of the fracture of FPC track. First, the sandwiched region between any two break points of the track skeleton is hypothesized as the alternative fracture to wait for ''testing''. Then, the language semantic judgment (LSJ) algorithm is proposed to verify (''testing'') the hypothetical connecting track which is the union of the two incomplete tracks located by the ends of the alternative fracture. And the structure reasonable degree of the hypothetical connecting track compared with the FPC layout is tested by the longest-relative sequence (LRS) algorithm we proposed. Then the error control technology is used to conduct the posterior verification, to solve the problem that circuits with the same topology structure interfere with the evaluation process of LSJ algorithm. In addition, we have established an automatic optical detection system for FPC of the laptop keyboard. We also conduct experiments with the images captured by this system. The results demonstrate that, compared with the state-of-the-art methods, our proposed algorithm can provide a better detection effect for the track fracture-the Recall, Precision and FNR are 0.9185, 1, and 0.0815 respectively under the condition of without missing detection. And the time consumption is 1.6915 s, which is a relatively short time-consuming compared with the other methods.