How to set the working directory for MS Test projects

前端 未结 3 1746
隐瞒了意图╮
隐瞒了意图╮ 2021-02-07 11:32

how can I set the working directory for MS Tests projects, like I can do it for normal application projects? My Component that is tested need to access some config files that ar

3条回答
  •  再見小時候
    2021-02-07 11:46

    The working directory for test projects is created at the time you start running your tests.

    If you run them locally this is created in a folder TestResults inside your project folder. If you run them in remote machines a different folder is created in each test agent in the following path:

    C:\Users{userRunsTheTest}\AppData\Local\VSEQT\QTAgent\{GuidForThisRun}

    In order your files to be deployed in these folder and have access to them you have to:

    1. Set the Copy to Output Directory = Copy Always
    2. In the test that needs these files set them as DeploymentItems.

提交回复
热议问题