Here, a novel diagnostic method was developed to detect mastitis pathogens in milk samples by combining loop-mediated isothermal amplification with a split enzyme biosensor whereby trehalase fragments were fused with a DNA-binding protein, SpoIIID. Here, TREH is linked to mastitis.