  Let $\pi_1,\pi_2$ be a pair of cuspidal complex, or $\ell$-adic,
representations of the general linear group of rank $n$ over a non-archimedean
local field $F$ of residual characteristic $p$, different to $\ell$. Whenever
the local Rankin-Selberg $L$-factor $L(X,\pi_1,\pi_2)$ is nontrivial, we
exhibit explicit test vectors in the Whittaker models of $\pi_1$ and $\pi_2$
such that the local Rankin-Selberg integral associated to these vectors and to
the characteristic function of $\mathfrak{o}_F^n$ is equal to
$L(X,\pi_1,\pi_2)$. We give an initial application of the test vectors to
reduction modulo $\ell$ of $\ell$-adic $L$-factors.
