Commercial brewries in the UK, as Grain Mother points out will start with the water quality report provided by the local water company. Smaller breweries here in the UK will reguallay send of samples to companies such as BrewLab, Murphy & Son and Campden BRI to have water analysis done on a 500ml sample.
Murphy do one or two free tests a year for their customers, and do more for a small fee.
Larger breweies will have in house labs and daily or weekly check the water entering their facilities, using titration, indicator chenicals and a photospectrometer. Also they will often pass the water through RO and then add back the ions to the correct levels for the brand being produced that day.
There are off the shelf tests, previously not availabale via home brew suppliers, but lab supply shops do carry these tests.
Simple test strips you can get via amazon etc..
These tests are not hugely accuarate but do at least give you banding tha you can pair up with a municipal water report to have a good idea of the incoming water hardness.