  In this paper, we carry out a systematic study of the prospect of testing
general relativity with the inspiral signals of black hole binaries that could
be detected with TianQin. The study is based on the parameterized
post-Einsteinian (ppE) waveform, so that many modified gravity theories can be
covered simultaneously. We consider black hole binaries with total masses
ranging from $10\rm M_\odot\sim10^7 M_\odot$ and ppE corrections at
post-Newtonian (PN) orders ranging from $-4$PN to $2$PN. Compared to the
current ground-based detectors, TianQin can improve the constraints on the ppE
phase parameter $\beta$ by orders of magnitude. For example, the improvement at
the $-4$PN and $2$PN orders can be about $13$ and $3$ orders of magnitude
(compared to the results from GW150914), respectively. Compared to future
ground-based detectors, such as ET, TianQin is expected to be superior below
the $-1$PN order, and for corrections above the $-0.5$PN order, TianQin is
still competitive near the large mass end of the low mass range $[10 \rm
M_\odot, \,10^3 \rm M_\odot]\,$. Compared to the future space-based detector
LISA, TianQin can be competitive in the lower mass end as the PN order is
increased. For example, at the $-4$PN order, LISA is always superior for
sources more massive than about $30\rm M_\odot\,$, while at the $2$PN order,
TianQin becomes competitive for sources less massive than about $10^4\rm
M_\odot$. We also study the scientific potentials of detector networks
involving TianQin, LISA and ET, and discuss the constraints on specific
theories such as the dynamic Chern-Simons theory and the Einstein-dilaton
Gauss-Bonnet theory.
