In labs i've done at school we tested the pH for water and we used these strips that turn colours. And there is a legend that tells you it's pH if that colour shows up. I would assume something similar would be required.
I imagine they would use a pH meter. I havent ever tested the pH of soil, but I have to test the pH of certain solutions I use for my research and that is what we use.