Dynamics of Gravitational Waves in 3D: Formulations, Methods, and Tests