The ratio of branching fractions ${cal{R}}(D^{*-})equiv {cal{B}}(B^0 to D^{*-} tau^+ u_{tau})/{cal{B}}(B^0 to D^{*-} mu^+ u_{mu})$ is measured using a data sample of proton-proton collisions collected with the LHCb detector at center-of-mass energies of 7 and 8 TeV, corresponding to an integrated luminosity of 3$~$fb$^{-1}$. The $tau$ lepton is reconstructed with three charged pions in the final state. A novel method is used that exploits the different vertex topologies of signal and backgrounds to isolate samples of semitauonic decays of $b$ hadrons with high purity. Using the $B^0 to D^{*-}pi^+pi^-pi^+$ decay as the normalization channel, the ratio ${cal{B}}(B^0 to D^{*-} tau^+ u_{tau})/{cal{B}}(B^0 to D^{*-}pi^+pi^-pi^+)$ is measured to be $1.97 pm 0.13 pm 0.18$, where the first uncertainty is statistical and the second systematic. An average of branching fraction measurements for the normalization channel is used to derive ${cal{B}}(B^0 to D^{*-} tau^+ u_{tau}) = (1.42 pm 0.094 pm 0.129 pm 0.054) %$, where the third uncertainty is due to the limited knowledge of ${cal{B}}(B^0to D^{*-}pi^+pi^-pi^+)$. A test of lepton flavor universality is performed using the well-measured branching fraction ${cal{B}}(B^0 to D^{*-} mu^+ u_{mu})$ to compute ${cal{R}}(D^{*-}) = 0.291 pm 0.019 pm 0.026 pm 0.013$, where the third uncertainty originates from the uncertainties on ${cal{B}}(B^0 to D^{*-}pi^+pi^-pi^+)$ and ${cal{B}}(B^0 to D^{*-} mu^+ u_{mu})$. This measurement is in agreement with the Standard Model prediction and with previous measurements.