Migraines can occur in the gut as well as in the head. Can cause the vomiting, gut pain, etc. Sulfites are one known trigger. I'm sulfite-sensitive.
Yes, there is a test for molybdenum level. But this isn't the whole story.
And yes, there is a urinary sulfite test, but it has to be tested in fresh (i.e., within 10 minutes of urinating) to be accurate. A urinary sulfate test is not always accurate at diagnosing sulfite issues, because it is possible the body hasn't dumped the excess sulfite (which rapidly converts to sulfate) in the particular urine batch getting tested.
Can reverse or decrease sulfite sensitivity with supplements, if you know how to go about
it (requires special testing).
Methylation Panel test (done at home via finger prick; no doctor orders required):www.holisticheal.com/health-tests/nutrigenomic-testing
Email me if you want to know where sulfites lurk in foods (more than just if you can read it on a label...depends on senesitivity threshold) - I have a huge list. You may not need to avoid all the stuff on the list because your sensitivity threshold may be higher than mine (I'm sensitive to very tiny amounts of sulfites).
Also, the sudden, recent onset of your symptoms suggest infection (gut and/or kidney) as another potential cause of your symptoms. Have you been assessed for Candida overgrowth? Perhaps a Naturopathic physician could be of some help.