public ExistingTestAutomation(ITmiTestImplementation existingAutomation)
 {
     Identifier = existingAutomation.TestId;
     Name = existingAutomation.TestName;
     TestType = existingAutomation.TestType;
     Storage = existingAutomation.Storage;
 }
Ejemplo n.º 2
0
        public void LoadTestAutomationImplementation()
        {
            ITestCase test;

            try
            {
                test = TfsShared.Instance.SourceTestProject.TestCases.Find(Id);
            }
            catch (Exception not) {
                return;
            }

            ITmiTestImplementation implementation = (ITmiTestImplementation)test.Implementation;

            if (implementation != null)
            {
                this.AutomatedTestType    = implementation.TestType;
                this.AutomatedTestId      = implementation.TestId.ToString();
                this.AutomatedTestStorage = implementation.Storage;
                this.AutomatedTestName    = implementation.TestName;
                this.HasAutomation        = true;
            }
            else
            {
                this.HasAutomation = false;
            }
        }
 public ExistingTestAutomation(ITmiTestImplementation existingAutomation)
 {
     Identifier = existingAutomation.TestId;
     Name       = existingAutomation.TestName;
     TestType   = existingAutomation.TestType;
     Storage    = existingAutomation.Storage;
 }
 /// <summary>
 /// Sets the associated automation of specific test case.
 /// </summary>
 /// <param name="testCase">The test case.</param>
 /// <param name="testManagementTeamProject">The test management team project.</param>
 /// <param name="testForAssociation">The test to be associated with.</param>
 /// <param name="testType">Type of the test.</param>
 public static void SetAssociatedAutomation(this ITestCase testCase, ITestManagementTeamProject testManagementTeamProject, Test testForAssociation, string testType)
 {
     try
     {
         log.InfoFormat("Associate test case with title= {0}, id= {1} to test: {2}, test type= {3}", testCase.Title, testCase.Id, testForAssociation, testType);
         ITmiTestImplementation imp = testManagementTeamProject.CreateTmiTestImplementation(testForAssociation.FullName, testType, testForAssociation.ClassName, testForAssociation.MethodId);
         testCase.Implementation = imp;
     }
     catch (NullReferenceException ex)
     {
         log.Error(ex);
     }
 }