2014年7月17日星期四

Coded UI Playback Configuration



How to Config a TestMethod's Playback Timeout Length
To set a specific time length
[Timeout(int milliseconds)]

To make it run as long as it needs.
[Timeout(Microsoft.VisualStudio.TestTools.UnitTesting.TestTimeout.Infinite)]


Few tips on implementing a Coded UI Test Plugin Extension

2014年7月15日星期二

Loading System.ServiceModel configuration section using ConfigurationManager



// Automagically find all client endpoints defined in app.config
ClientSection clientSection = 
    ConfigurationManager.GetSection("system.serviceModel/client") as ClientSection;

ChannelEndpointElementCollection endpointCollection =
    clientSection.ElementInformation.Properties[string.Empty].Value as     ChannelEndpointElementCollection;
List endpointNames = new List();
foreach (ChannelEndpointElement endpointElement in endpointCollection)
{
    endpointNames.Add(endpointElement.Name);
}
// use endpointNames somehow ...

http://mostlytech.blogspot.com/2007/11/programmatically-enumerate-wcf.html

序言