A VO2 test essentially tests your heart and lung capacity. The lung surrounds the mediastinum and the heart and stomach are the two main organs lying within it.
Therefore, as VO2 tests make your heart and lung (to be more precise: the diaphragm and other breathing muscles) work at peak power and their volume changes are at their maximum, there is immense pressure going on in this region. A full stomach, therefore, means that they cannot work at their full potential.
Another problem is that this pressure at high-intensity exercise leads to gastric emptying delay, which is a main cause for exercise-induced nausea.
Long story short, if you want to see your full potential and don't like throwing up, your stomach should be relatively empty for the test.
As of caffeine, it's like @JohnP said: it elevates your base heart rate and is (or rather because it is) a vasodilator. Therefore, it influences test results.