In reply to Mustafa:
Why would you change the variables being logged on a per-test basis? I would expect that if you are dumping VCD files, then you are only dumping the signals from your DUT. I would maintain the same set of signals for each test.
If you want to dump variables from your environment, I would strongly recommend using your simulator’s native logging format.