A assume you're asking about
unit testing. Private methods should be tested of course, but not directly. Unit tests should mimic how the code is actually used in a real application. So call the public methods, and those will in turn call the private methods so that everything gets tested.
When you write unit tests that call private methods directly that makes your tests brittle and creates disincentives to refactoring. Developers should be able to freely refactor the internal design of a class as long as the public API remains unchanged. But if you have a bunch of unit tests calling private methods then they have to update all those tests as well, and so refactoring becomes so difficult that developers tend to just not do it. This causes accumulation of technical debt.
Personally when I am writing new code I will often write some temporary unit tests for private methods just to act as scaffolding until I get the higher-level public methods working correctly including the tests for same. Then I throw away the private method unit tests before pushing the new code to the master branch.