Is it possible to pass command line arguments in coded ui test ? in normal C# programs we just pass the arguments along with the exe file eg: filename.exe "2" "7" in command prompt.
but can something like this be done in coded ui tests?
Thanks
Is it possible to pass command line arguments in coded ui test ? in normal C# programs we just pass the arguments along with the exe file eg: filename.exe "2" "7" in command prompt.
but can something like this be done in coded ui tests?
Thanks
No, you can do that. CodedUi
tests are executed through command line through MSTest
which does not support it. Check here to see the available command-line options of MSTest
.
However, you can create another Project
(e.g. console application) to achieve that. The second project has a reference to your CodedUI Project
. Then pass the parameters through the .exe file of this Project which calls the appropriate CodedUI Test Method
. But I think that this will not work like MSTest
does (it will not create Test Results).