/castrandom bug

I just want to cast a random shock spell…broken macro? Can anyone help with /castrandom macro?

/castrandom [nochanneling] Earth Shock, Frost Shock

What about it isn’t working?

The TBC macro engine should be the same as retail, and thus once it picks a random spell, it won’t try to select a new random spell until the current one has succeeded. As such, if you are trying to basically have one button you can spam to cast all of your shocks, it often won’t work like you desire.