Not necessarily. However, her presence "improves" the statistical significance of the test – it increases the paternity index and the probability of paternity, or on the other hand, increases the number of exclusionary systems. If the mother is part of the paternity test, she must be non-excluded in relation to the child (the maternity is confirmed).
In case of doubt about maternity, it is necessary to test it separately. Maternity is tested in principle the same way as paternity, but it is not usually performed because there is typically no reason for it (however, with the rise of assisted reproduction, cases involving questions about maternity are becoming more common).