@AlPage48, this is what I have found so far and I will try to address your questions.
The test is available in many hospitals, and it can be speculated that procedures will be similar. What follows is information related to The First People’s Hospital of Yunnan Province (locally known as Kunhua Yiyuan) on Jinbi Lu.
At Kunhua an appointment is not needed, but you do need to be registered. Registration is not hard, but I cannot tell you the registration process as it was several years ago.
You go to the clinic in the morning between 8 and 11.30. The hospital recommends you go before 11.00. The results are available later on the same afternoon.
The cost at Kunhua is 122 RMB.
The hospital told us the test is a throat swab test.
The test certificate is valid for only 7 days.
Important note, not all hospitals offer a same day service, and some hospitals do not offer the tests every day of the week.
The test is not just required for foreigners. I am now aware of at least two local people who have been required to take the Covid19 test for travel.
This is not currently a government requirement. It is also not an airline requirement.
This requirement seems to be set by Ctrip for hotel bookings. A few months ago I remember seeing cases of foreigners with ‘firm bookings’ on Ctrip being turned away from hotels on arrival.
Not all hotels in Shanghai will take foreigners. We had to phone 5 four star hotels before we found one that would take me as a guest. The hotel we booked does not currently require the Covid negative test certificate, but they did suggest I got one in case Kunming’s Covid19 risk rating increases in the next few days.
The fact that I have a UK passport is a bit of a ‘red herring’. I specifically told my wife to say that I have a UK passport when booking. Ctrip said that I needed a test certificate. It is probably safe to assume that all foreigners would fall under the same Ctrip advice, and/or the company policies of different hotels.
I will have the test on Monday, because I fly out on Tuesday and the certificate is valid for 7 days only. I will update after my test on Monday, if additional relevant information presents itself.