Pokemon has been around for a very long time and the amount of creatures has grown to over 700. When asked about how do they go about balancing all of these Pokemon this is what Mr. Morimoto has to say:
We start off with an idea in mind, like “How would this little fellow have to be used to be able to beat that guy when it’s about this strong?” Keeping that in mind, we assign stats to each Pokémon. After that, we do all kinds of playtesting among ourselves and adjust areas where the balance seems off as we go along. Even so, after the games are released, we find that they are still sometimes used in ways that we never imagined. There is still room for customization by deciding moves and Abilities, and so it’s really interesting to see what trends develop on the battle scene after the games’ release.
So there you have it. A lot of the testing is done by playing the game themselves after the Pokemon’s stats are finalized. Game Freak really learns a lot from the community after their games have released.