in your dnsmasq.conf add:
address=/.test/127.0.0.1
in your http-vhosts.conf add:
<Virtualhost *:80>
UseCanonicalName Off
VirtualDocumentRoot "/Users/<username>/Sites/test/%1"
ServerAlias *.test
</VirtualHost>
create file "/etc/resolvers/test" with content:
nameserver 127.0.0.1
More info about the resolver thing. You could also edit the "/etc/hosts" file. I prefer the /etc/resolvers solution.
Do not forget to flush DNS caches afterwards.