You get a different amount of style points for each activity you do in Lumiose city.
Battling at the Battle institute will get you 3 style points. The maximum amount of style you can get is 255, meaning it will take you exactly 85 times testing a team there to get max style points. So yeah, it might take a while, so I would recommend doing other things as well, because going through the Battle Institute over and over can get boring.
There is a chart for the amount of style points gained for each activity in the source.
Hope I helped