Reputation: 723
Core Problem
The problem I am having is that connectivity to Exchange from Outlook is blocked while executing an integration test through the Microsoft Test Agent (i.e. Outlook is in the disconnected state). The test is launched through Microsoft Test Manager. Below is the code for the integration test I am having problems with and I simplified the code as much as possible to rule out code within the integration test causing the problem. I also eliminated all other tests from running.
[TestMethod]
public void LaunchOutlook()
{
Process.Start(new ProcessStartInfo(@"C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe"));
Thread.Sleep(120000);
}
I can change how long Outlook is blocked by changing the Thread.Sleep timeout. While the test is running, I can restart Outlook and Outlook is still blocked. After the test ends while Outlook is still running, connectivity to Exchange is restored. This happens for Outlook 2010 and Outlook 2013. If I run the integration test within a console app, Outlook connectivity is not blocked. If I run the test code manually through MSTest.exe, Outlook connectivity is not blocked. The only way it’s blocked is if the integration test is executed by the Microsoft Test Agent which is the required approach for integration testing.
More details on the problem
Outlook is running on a machine that is part of a Hyper-V Lab with network isolation enabled. There are other machines within the same lab that have Outlook instances pointed against the same Exchange server. Executing the test on one machine causes Outlook connectivity issues with other machines within the same lab where the Outlook instances are pointed at the same Exchange server. I have small Hyper-V lab with network isolation enabled which is very similar to the lab mentioned above. The major difference is that it only has one machine with Outlook installed. This Outlook is able to connect to Exchange while executing the test above through Microsoft Test Manager. It is very clear that this is an environmental issue since it works in one lab and not the other. Both labs have the same Exchange server installed, and the same Microsoft Test Agent installed on all machines within the lab. I have ruled out the Outlook version as being the issue since the larger lab contains the same Outlook version as the Outlook version in the smaller lab.
During test run
Notice that Outlook is in the disconnected state.
After test run.
Notice that Outlook is not connected to Exchange.
Environment Information
Outlook 2010 Version: (14.0.7113.5000) SP2 (14.0.1740.5002) 64-bit or 32-bit Outlook 2013 Version: (15.0.4667.1000) MSO (15.0.4675.1002) 64-bit or 32-bit Windows 7 Version: 6.1 (Build 7601: Service Pack 1) Exchange 2013 Version: 15.0 (Build 847.32) Windows Server 2008 R2 Version: 6.1 (Build 7601: Service Pack 1) Microsoft Test Manager 2013 Version: 12.0.31101.0 TFS 2013 Update 4 Version: 12.0.31101.0 Microsoft Test Agent Version: 12.0.31101.0 Update 4
Troubleshooting Steps
Requesting Help
Can you please help me troubleshoot this problem? I see two approaches to identifying the problem. 1. Looking for differences between the two environments 2. Obtaining logs or other information that would expose the core problem.
I am open to suggestions or ideas especially if you have a different approach to solving the problem. Feel free to ask for other information related to the problem like logs, PowerShell commands, and registry values. If you are short on time, can you at least post some suggestions or ideas related to resolving this problem? Thanks, Keith
Upvotes: 1
Views: 208
Reputation: 723
After installing fiddler I figured out what the problem was. The Microsoft Test Agent was activating a proxy server which was blocking connectivity to exchange. The proxy server was activated due to having the ASP.Net Client Proxy for IntelliTrace and Test Impact turned on.
Below is a link to the article with the exact same problem.
Upvotes: 2