A matrix is almost strictly totally positive if all its minors are nonnegative and they are positive if and only if they do not contain a zero in their diagonal. An optimal test to check if a given matrix belongs to this class of matrices is presented. For this purpose, we establish a bijection between the set of nonzero entries of the matrix and a set of submatrices called essential submatrices, which are explicitly constructed. The test shows that it is sufficient to check the positivity of the essential minors, improving the characterization presented in . Essential minors are also applied to the construction of accurate bidiagonal decompositions of almost strictly totally positive matrices, which in turn can be used for deriving accurate algorithms for these matrices.