As advised change oil, plugs and air filter, fill tank with BP ultimate or similar and maybe redex to clean injectors.
Go for a couple of decent runs in the days before the test and make sure you use some revs and get the CAT hot. Short local mileage can coat the CAT internals up and stop it working properly -and you can get a rotten egg smell from tailpipe ( same thing happens to DPF on diesels and they can burn out). Most of my cars have done large daily mileage and never had one fail an emissions test, mostly the figures are same as a new car, engines and CATS do not like short runs - another reason not to buy a car that has only done very low mileage for its age.