I am sharing my experience with getting a Covid test for US re-entry from Milan Malpensa. I am vaccinated, but as of now (Aug 21), you must have a negative test within 72 hours of departure back to the US. The short version - it took me about 2 hours from train arrival to get to my gate with all steps complete, including a test. (This is not the same as needing to get tested as soon as you enter Italy - I am only describing departure testing.)
It is tempting to get a free test at the Red Cross tent in Milan Central station. However, it is only open a few hours a day, the station is not in a good area, and lines can be very long, so you may not get an appointment. I tried MC but it was closed by 1:30 PM and people have reported it closes earlier sometimes.
I couldn't make other arrangements in time so I planned to get my test in Malpensa. It is on the '0' floor of MXP, whereas the train arrived on the -1 floor. There are arrows on the 0 floor to direct you to the area, which is on the left side of terminal 1 if you get off the express train. The appointment-booker with San Donato requires an Italian fiscal code so don't bother with it. That day, there were only appointments available from 8:15 on in official app but I walked in even sooner so I don't know where those times come from.
When I arrived at ~7:50 AM on a Monday, there were about 5 people in line. I waited about 20 minutes and paid 36 euros. Results came back within 5 minutes in English with a paper. Because you need a boarding pass to proceed to security, you will need to checkin with your airline to get one, with the test results in hand, even if you're not checking luggage.
On this particular day, United checkin was at the other end of the terminal from the testing area so it was quite a walk. Another 15 minutes in line to check in. Walk back to the middle of the terminal for the gates. 20 minutes for security. Another walk back for passport control. 15 minutes in line there. Then finally you walk towards your gate. Everything was very far apart, so end-to-end, even with reasonable waits at each step, I arrived on the 7:27 train and was at my gate by 9:20 for a 10:20 departure. This aligned well with getting a snack and boarding, so I am sad to say the 3-hour rule works best here.
My US vaccine card was acceptable for any tourist attraction (ie Duomo), restaurant, etc that required a Green Pass. You will need to show your passport to prove that you are the person named on the vaccine card, so carry it with you. I traveled between Milan, Lake Como, Bellagio, and Cinque Terre with ease. Hope this helps someone plan.