问题
A few months ago, when I was reading about datasources in Unit Tests with MSTest, I stumbled on a few old posts, claiming that it was just a matter of going into properties and setting the datasource on the gui. This resulted in the attribute being added to the test method automatically with the required arguments.
I was never able to select a unit test on the property grid though, and wondered what these people were talking about.
Recently, I learned that this was a feature of the past, and was removed with the shift to the new Test Explorer window.
Is it possible to change unit test properties somewhere else in the new Visual Studio UI, or get that functionality back somehow? Whenever I have to add a datasource to a test method I end up having to check the whole documentation for it again, because there is a bunch of connection strings with custom formatting that you have to remember.
来源:https://stackoverflow.com/questions/25409112/how-do-i-change-unit-test-properties-through-the-ui-in-the-newer-versions-of-vs