Let $G$ be a finite group, $k$ be a field whose characteristic divides $|G|$, and $\rho:G\hookrightarrow\operatorname{GL}_n(k)$ be a faithful representation of $G$. Let $V$ be a $k$-space of dimension $n$ with ring of invariants $k[V]^G$. Suppose further that $k[V]^G$ is Cohen-Macaulay, so that there are primary invariants $f_1,\ldots,f_n$ and secondary invariants $h_1,\ldots,h_m$ such that $k[V]^G$ is a free module over $k[f_1,\ldots,f_n]$ with basis given by $1,h_1,\ldots,h_m$.

Given a list $f_1,\ldots,f_n$ of invariant functions on $V$, one may check to see if they form a set of primary invariants using the sufficient condition (which is also necessary) that the variety defined by the $f_i$ over $\overline{k}$ is $\{\bf{0}\}$.

Given primary invariants $f_1,\ldots,f_n$, I'm looking for sufficient conditions for a list of invariant functions $h_1,\ldots,h_m$ to be secondary invariants. Since $k[V]^G$ is Cohen-Macaulay, a necessary condition is that $$ m=\frac{\prod_{i=1}^n\operatorname{deg}(f_i)}{|G|}. $$ In the non-modular case, one could make use of Molien's formula for the Hilbert series to determine the degrees of the secondary invariants, and then show that $$ k[V]^G_{\operatorname{deg}(h_i)}\subset k[f_1,\ldots,f_n]\cdot 1\oplus k[f_1,\ldots,f_n]\cdot h_1\oplus\ldots\oplus k[f_1,\ldots,f_n]\cdot h_m $$ for all $i=1,\ldots,m$, where $k[V]^G_{\operatorname{deg}(h_i)}$ is the $k$-space of homogeneous invariant functions of degree $\operatorname{deg}(h_i)$ (which is presumably computable given $\rho$).

What can be said about the modular case? If I write down $h_1,\ldots,h_m$, how can I test that they are secondary invariants?