We conducted a survey of seven magnetic O and eleven B-type stars with masses above $8M_{odot}$ using the Very Large Array in the 1cm, 3cm and 13cm bands. The survey resulted in a detection of two O and two B-type stars. While the detected O-type stars - HD 37742 and HD 47129 - are in binary systems, the detected B-type stars, HD 156424 and ALS 9522, are not known to be in binaries. All four stars were detected at 3cm, whereas three were detected at 1cm and only one star was detected at 13cm. The detected B-type stars are significantly more radio luminous than the non-detected ones, which is not the case for O-type stars. The non-detections at 13cm are interpreted as due to thermal free-free absorption. Mass-loss rates were estimated using 3cm flux densities and were compared with theoretical mass-loss rates, which assume free-free emission. For HD 37742, the two values of the mass-loss rates were in good agreement, possibly suggesting that the radio emission for this star is mainly thermal. For the other three stars, the estimated mass-loss rates from radio observations were much higher than those expected from theory, suggesting either a possible contribution from non- thermal emission from the magnetic star or thermal or non-thermal emission due to interacting winds of the binary system, especially for HD 47129. All the detected stars are predicted to host centrifugal magnetospheres except HD 37742, which is likely to host a dynamical magnetosphere. This suggests that non-thermal radio emission is favoured in stars with centrifugal magnetospheres.