the blood sample antibody test is stil hit and miss because people only started getting it in december, recovering in february. so they need many blood samples of post-february to then use as comparison to identify antibodies specific to immunisation of covid19
as for the initial identify the virus test. they have years of samples of previous viruses so its easy to compare a new strain
The PCR test developed by the University of Washington School of Medicine (UW Medicine) targets just 100 nucleotides that are specific to SARS-CoV-2, Dr. Alex Greninger, an assistant professor in the Department of Laboratory Medicine and an assistant director of the Clinical Virology Laboratory at UW Medicine, told The Seattle Times.
These 100 nucleotides include two genes in the SARS-CoV-2 genome. A sample is considered positive if the test finds both genes, inconclusive if just one gene is found, and negative if neither gene is detected.
...
PCR tests work by detecting specific genetic material within the virus. Depending on the type of PCR on hand, health care workers might swab the back of the throat; take a saliva sample; collect a liquid sample from the lower respiratory tract; or secure a stool sample.
....Once a sample arrives at the lab, researchers extract its nucleic acid, which holds the virus' genome. Then, researchers can amplify certain regions of the genome by using a technique known as reverse transcription polymerase chain reaction. This, in effect, gives researchers a large sample that they can then compare to the new coronavirus, known as SARS-CoV-2.....
Tests from UW Medicine that are either inconclusive or positive are sent to Washington's Public Health Laboratories and the CDC for further testing, The Seattle Times reported.
In contrast, serological tests look for specific antibodies that the body has produced to fight the virus. "If they detect those antibodies, [the test] gives a positive result,"
'https://www.livescience.com/how-coronavirus-tests-work.html