开发者

Referring to files in MSTest breaks on Team Build as path different

开发者 https://www.devze.com 2023-03-11 21:30 出处:网络
We have a set of user acceptance tests (written in MSTest) which run fine locally, they\'re referring to some test files which the acceptance tests load in and process.

We have a set of user acceptance tests (written in MSTest) which run fine locally, they're referring to some test files which the acceptance tests load in and process.

However, when running on team build (TFS 2开发者_JS百科010) the path to the files we're using is obviously different and the file cannot be found. This is still the case with using relative paths as the depth at which the local tests happen is different to the depth at which they happen on the build server.

What's the best way to refer to a file in tests so that it works both locally and during team build test runs.

I've considered putting them in the team project but I don't even know what the path to that will be.

Any ideas much appreciated!


Try the [DeploymentItemAttribute][1]

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号