They can test for steriods in the Military, although rarely.
The usual random piss test is just for party drugs and other recreational drug, however they can randomly nominate people for samples to be taken for further testing including ASS (not sure about sarms). Although it is 'random' this is usually targeted in that the person they want to test for PEDs just so happens to be in the list of 'random' people they called in for testing.
basically if the WADA lists it as a banned substance it is banned in the military.