You really need to consider the nature of what you are trying to achieve here.
It's hard to say for sure that you click on the code. I got the impression that you have a website that calls a web service. You are testing client code in this context, and not just checking the service.
If this happens, remove the attributes and provide the URL to the correct service, for example UrbaEsc. If you do not remove the attributes, you run the calling code in the context of the site.
Even if the above is not a script and based on the fact that you answered UrbanEsc in the comments, you will then test the external call to the web service initiated from the same site process.
You said: "Found, but VS is still running something on the local host and then trying to reach the external server ... It seems that VS is just not designed for real remote testing of web services"
Read above. I would say you need to better understand what you are allowing. Of course, you can test remote web services, for example, you can do almost anything you can encode. You do this from client code that does not know anything else that any other external service client would know. Support does not stop there, since you can perform load testing of the service.
Please note that what you are doing is not unit tests, these are integration tests. Or depending on the size of your system, complete system tests.
source share