My need is to Pass a custom arguments/Parameter to the unit test when running via the MsTest in the Command-line. The argument must be as command line argument and need to access the param value inside the test class or method.
To access the MSTest tool, add the Visual Studio install directory to the path or open the Visual Studio Group from the Start menu, and then open the Tools section to access the Visual Studio command prompt. Use the command MSTest from the command prompt.
To pass command line arguments, we typically define main() with two arguments : first argument is the number of command line arguments and second is list of command-line arguments. The value of argc should be non negative. argv(ARGument Vector) is array of character pointers listing all the arguments.
The MSTest command line does not support this option. Please look for a way to:
A similar suggestion is posted in MSTest Command Line Settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With