'Unusual Target Invocation Error in Unit Tests

I'm trying to run a group of 12 unit tests. When I run the entire group, one test passes and the rest fail with the same error:

Could not find default endpoint element that references contract 'XXXXXXXXXXXXXXXX.XXXXXXXXX' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

This is not an uncommon error, but what I find unusual is that if I go back and run one of those failed tests, it passes with no issues. I change nothing.

So my question is, why am I getting this particular error when I run the entire group but not when I run one of the same tests alone?

I will be limited in what code I can share as it is proprietary.

TIA!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source