コード例 #1
0
        public List <TestConfiguration> GetTestConfigurations()
        {
            string projectName = ClientSampleHelpers.FindAnyProject(this.Context).Name;
            // Get a testplan client instance
            VssConnection      connection     = Context.Connection;
            TestPlanHttpClient testPlanClient = connection.GetClient <TestPlanHttpClient>();

            // Get Test configurations
            List <TestConfiguration> configurations = testPlanClient.GetTestConfigurationsAsync(projectName).Result;

            foreach (TestConfiguration configuration in configurations)
            {
                Console.WriteLine("{0} {1}", configuration.Id.ToString().PadLeft(6), configuration.Name);
            }

            return(configurations);
        }