For me, what I'm hopeful for your case is to develop a custom test harness that supports data-driven tests that would call out the path to the data (and maybe when we report the relevant file/line of a test in json, we point back to the data). Unsure if this would fully work with your case or if code-gen is a hard requirement. Even if it is, I think this kind of scheme would work.