A heartworm test won't do any good until the dog is at least 6 months of age. Parvo test can be done but they usually aren't unless you suspect the dog has parvo.

Is this just one isolated case of vomiting or is it happening quite often?

I wouldn't worry too much if it was just this once. If it is happening often I'd get him right to the vets.

What type of food are you feeding? If it's a decent brand I wouldn't worry too much about that either, he's probably still adjusting and 2 cups of a decent food should be sufficient anyways for his size.

How has he been?