It's called Insulation Resistance Testing and an electrician would typically use a device like a Megger tester.
Here's a good video about it: https://www.youtube.com/watch?v=CsXUuuV4_sw
Here's a good video about it: https://www.youtube.com/watch?v=CsXUuuV4_sw