locked
Pass run time parameters to coded ui test through command line RRS feed

  • Question

  • Hi,

    I am trying to run coded UI test using vstest.console.exe through a bat file. I want to specify command line parameters to my test as I do with Console applications. Is that possible?

    The post @ https://blogs.msdn.microsoft.com/visualstudioalm/2015/09/04/supplying-run-time-parameters-to-tests/  gives me an odea that I can specify .runsettings to use it globally and I can override it using test task. But I am not sure how can I do it command line.

    Any help on this is really appreciated.

    Thursday, February 4, 2016 8:40 PM

Answers

  • Hi,

    Thanks for your post.

    >>I want to specify command line parameters to my test as I do with Console applications. Is that possible?

    As far as I know. It is not supported.

    I have read the article you shared. Based the description in that article, we can use runsettings file to specify one parameter to our test.

    And in Command line. I think we can’t achieve it like this.

    I suggest you could also define a runsettings file and use VSTEST Command line to call the runsettings file with the following command line:

    vstest.console.exe  myTestFile.dll /Settings:Local.RunSettings

    Best Regards,

    Lake Xiao

    • Proposed as answer by lake Xiao Monday, February 8, 2016 7:26 AM
    • Marked as answer by lake Xiao Wednesday, February 17, 2016 7:28 AM
    Saturday, February 6, 2016 1:36 AM