Whenever these arguments are used not by a player, the test fails.
How to recreate:
Use /testfor @a[y=0,y=10].
This should detect every player higher than y=0 but below y=10.
In my test this worked.
Now use the same command in a repeating command block set to always active and set commandBlockOutput to true so you can see how the command gets performed.
Even though it's the same command, it doesn't work.
/execute on a player DOES work.
/execute on an entity DOESN'T work.
Strange, huh?
if only one of the 3 dx, dy or dz is provided, the others default to 0
so use the execute command
duplicate of MC-79972