We have done that but it has yet to even spawn 1 single shroomcow. We tried on top of grass and in grass with no luck at all :-( Thank you for trying though.
flat land 9x9 grass directly under the spawner I can't remember if it needs to be open to the sky or covered but if you cover at least 3 open above it.