Let $f:X\rightarrow Y$ be a morphism of schemes over a field $k$. Can one check that $f$ is formally smooth using only Artin rings of the form $k^{\prime}\left[t\right]/t^{n}$, where $k^{\prime}$ is also a field?

Considering cuspidal curves one can show that you do at least need arbitrarily large $n$.