At the Milan Malpensa airport you can get either a PCR or a rapid-antigen test at the Sheraton hotel attached to the airport at terminal 1. The testing center is open from 4AM-9PM every day. You do not need to make an appointment, you can just walk in. It costs $40 if you’re staying at the Sheraton (I did mine today on Friday even though my reservation at the hotel isn’t until Sunday), or $50 for anyone else. It took 10 minutes to get my result.
They will also give you a Green Pass for free (which shouldn’t be necessary for Americans with a CDC vaccination card) in case you want one. Since this is a Green Pass based on a rapid test, it is only valid for 48 hours. Because I got tested on the day that the new Green Pass rules started, there was a lot of confusion about whether Americans needed a Green Pass or not. I suspect confusion will be the name of the game in August. Also, I tried three different ways to get the digital Green Pass with my access code and none of them worked.