VSTS Build - Choose which unit tests run depending on which files were modified in a pull request
问题 I would like to control which unit tests run in a VSTS build pipeline based on which files were modified in the PR that triggered the pipeline. Is there a way to detect which files were modified in a pull request during a VSTS build triggered for that PR, and then choose which tests to run based on that information? 回答1: Yes, this is possible: Manual Approach One approach to this is to have a custom Powershell task in your pipeline that sets a variable based on whether a certain file was