To test whether the variables are cointegrated or not, one of the well-known tests is the
Johansen trace test. The Johansen test is used to test for the existence of cointegration and is based on the estimation of the ECM by the maximum likelihood, under various
assumptions about the trend or intercepting parameters, and the number k of
cointegrating vectors, and then conducting likelihood ratio tests.
The Johansen test is a test for cointegration that allows for more than one cointegrating relationship, unlike the Engle–Granger method, but this test is subject to asymptotic properties, i.e. large samples. If the sample size is too small then the results will not be reliable and one should use Auto Regressive Distributed Lags (ARDL).
1-Giles, David. "ARDL Models - Part II - Bounds Tests
2-Pesaran, M.H.; Shin, Y.; Smith, R.J. (2001). "Bounds testing approaches to the analysis of level relationships". Journal of Applied Econometrics 16 (3): 289–326. doi:10.1002/jae.616
I think the documents you got give you the mathematics behind the Johansen Method or test, mine is just to give you the intuition. In fact the method is used to test for the long run relationship among variables. I.e. the evidence of long run relation is tested through that test with null hypothesis of no cointegration and alternative hypothesis of cointegration. The test recommends two statistics to check the long run relationship, these are; Trace statistics and Maximum Eigen value.
Depending on the software you use, from the output table of the test you can see the ranks. For example you can see that at rank 0, both statistics (trace and maximum Eigen value) are greater than critical values at normal significance levels (1, 5 and 10%). Thus you ca reject the null hypothesis meaning that there no cointegration among the variables and at this level you confirm the cointegration. Next, you go to rank 1 immediately, if the statistics are smaller than critical values, you could not reject the null hypothesis of one cointegration rather you accept the null hypothesis and the other null hypotheses about the absence of more than one cointegration could not be rejected. On this basis, it is concluded that, the cointegrating rank equals one, meaning that there is one cointegration among the variables. If both tests lead to the same conclusion, it means that it has been double confirmed that the variables included in your model are cointegrated or they have long run relationship also implies that these variables move together in long run.