The state will be testing ShakeAlert, the earthquake detection and alarm system, on phones in King, Pierce and Thurston counties Thursday.