I have to use the testing structure of the VS module to ensure that the code works correctly. However, I have a lot of problems getting tests that require command line arguments (since command line input must be set at runtime ... and with unit tests there is no real "run time"). Is there a way to run my unit tests by entering command line arguments? I realized that this is not an ideal way to create a program, but, unfortunately, I do not decide how the testing process works.
I read that I could potentially write a batch file and include it in the MStest / testcontainer folder. There are some wounds that I need to clear to do it this way, though. These wounds include:
1) I don't know anything about batch files
2) I do not know where the MStest / testcontainer folder is located, how to access it, how it works, or even add files to it (since it seems hidden or inaccessible).
3) I do not know what I would do with the batch file, even if it was written correctly in the MStest / testcontainer folder. How do my tests even suggest knowing him there, not to mention accepting data from him?
So, to summarize: how to do VS unit tests in command line arguments? If I need to use the batch file method, I would really appreciate it being explained to me as if I were 5. I apologize if I am a little helpless in this matter, but I cannot find any clear or useful explanation like any of these things works in this particular context.
Thanks a ton.
source share