According to my text-book Neyman-Pearson lemma says that the most powerful test of size $\alpha$ for testing point hypotheses $H_0: \theta=\theta_0$ and $H_1: \theta=\theta_1$ is a likelihood ratio test of the form
\begin{align*} \phi(x)= \left\{ \begin{array}{ll} \displaystyle 1, & \quad x > k \\ \gamma, & \quad x = k \\ 0, & \quad x < k \end{array} \right. \end{align*}
where $l(x)$ is the likelihood ratio
$$l(x)=\frac{f_{\theta_{1}} (x)}{f_{\theta_{0}} (x)}.$$
If $l(x)=k$ with probability zero, then $\gamma=0$ and the threshold $k$ is found as
$$\alpha=P_{\theta_{0}}[l(X)>k]=\displaystyle \int_k^\infty f_{\theta_{0}} (l) dl.$$
Where $f_{\theta_{0}} (l)$ is the density function for $l(X)$ under $H_0$.
Question I need to know whether my following understanding is correct.
When it is said that $\alpha=P_{\theta_{0}}[l(X)>k]$, does it mean that $l(X)$ is now a function of random variable $X$ where $X \sim f_{\theta_{0}}(x)$ and threshold $k$ should be calculated from $1-CDF_L(k)=\alpha$?
$l(X)$ is a function of a random variable so it is a random variable. If you can find the distribution of $l(X)$, then you can calculate the integral as $1-F_l(k)$.