As for vitamin D, I hate to be that guy, but you don't pass vitamin D in your urine even if you ingest excess amounts. That would be vitamin B and C as they're water-based.
Sun exposure isn't a guaranteed method of getting enough vitamin D especially if you live in a big city, as polluted air prevents the sun rays from forming vitamin D. With that said, the optimum levels of vitamin D are still being debated as many people with low vitamin D levels lead healthy lives well into their 70s/80s, so testing for deficiency is only advised when you experience symptoms of deficiency or if you belong to a certain age groups with increased risk of fractures.