No its not by the traffic police. By the cea officials. Yes they have mobile emission testing equipment and they are qualified and trained to do all those testing. They are the people who regulate all the emission test centres around the Sri Lanka and involve in defining the emission thresholds too.
No these road side tests are very seldom. Usually they stop the vehicles randomly ( of course traffic police need to be there). afik there are no spot fines for failing to abide emission standards. Problem comes if spot testing fails while you carry a valid testing certificate with you. I saw few such cases in media.
Further, you should aware of the validity of testing equipment and technical competence of the staff in the emission testing centres. You always have the right to ask calibration certificate of all the testing equipment, specially the sensors. Most of these gas , vibration, particle, noise censors are very sensitive and require timely maintenance, change of filters, cleaning and calibration by authorized persons or vendors ONLY. afik test centres are following those standards. But ..
If you really want to check your vehicle emission levels at home, can get a branded and reliable sensor for a around 1.2 M from Sri Lanka.