Forum Discussion

mugheessiddiqui's avatar
mugheessiddiqui
Contributor
7 years ago

Associate TestComplete File with Multiple Test Cases.

 

Problem:

Single TestComplete Test file is associated with Multiple Test Cases, When I run Test Plan using 'Run Functional Test' of VSTS, it fails with following error message

 

2018-02-27T17:02:47.8193056Z DistributedTests: Test run '21485' is in 'InProgress' state.
2018-02-27T17:02:47.8193056Z DistributedTests: Total Tests : 2, Passed Tests : 0
2018-02-27T17:02:58.2949208Z DistributedTests: Test run '21485' is in 'InProgress' state.
2018-02-27T17:02:58.2949208Z DistributedTests: Total Tests : 2, Passed Tests : 0
2018-02-27T17:03:08.6508146Z DistributedTests: Test run '21485' is in 'InProgress' state.
2018-02-27T17:03:08.6508146Z DistributedTests: Total Tests : 2, Passed Tests : 0
2018-02-27T17:03:19.2298962Z DistributedTests: Test run '21485' is in 'InProgress' state.
2018-02-27T17:03:19.2298962Z DistributedTests: Total Tests : 2, Passed Tests : 0
2018-02-27T17:03:29.6039930Z DistributedTests: Test run '21485' is in 'Completed' state.
2018-02-27T17:03:29.6039930Z DistributedTests: Total Tests : 2, Passed Tests : 0
2018-02-27T17:03:39.6135728Z ##[error]System.Exception: Some tests in the test run did not pass, failing the task.
2018-02-27T17:03:39.7385692Z ##[error]PowerShell script completed with 1 errors.

 

If I removed the association and only associate 1:1 mapping between TestCompete Test file (tc12Test) and Test Case in Test Plan. It works 'Run Functional Test' completes its execution and shows that Test Case is as passed.

 

Objective:

I want to run single associated Test File with multiple test cases. When VSTS completes execution it should marked passed all my associated Test cases.

Please let me know if is it possible to associate multiple Test Cases with single Test File.

 

https://support.smartbear.com/testcomplete/docs/working-with/integration/ms-vs/alm/test-cases/test-case.html

  • tristaanogre's avatar
    tristaanogre
    7 years ago

    The difference there is that it's direct Microsoft code... In your situation, you're using a, technically, third party tool to run the automation associated with MS VS test cases.  That third party tool associates an interface file (tc12Test) with the test case in a 1 to 1 relationship.  If you were doing everything strictly through Microsoft, then yeah, the solutions on that StackOverflow would apply... but this is not the case.

     

    Bite the bullet... create multiple tc12Test files... each one potentially identical, associate them with your test cases, run the full solution.

  • Not sure what you're referring to as "test file", however...

     

    You are probably leaving something open at the end of your TestComplete test - a web page or a database or whatever things you are testing.  This will work in a "run once" test but be completely broken in a "run many" situation.  Make sure everything is shut down at the end of a test run and try the multiple tests again.

    • mugheessiddiqui's avatar
      mugheessiddiqui
      Contributor

      My problem is tc12Test file fails immediately if it's associated with multiple test cases.
      I'm running my scripts on VSTS by using Run Function Test.

      • Marsha_R's avatar
        Marsha_R
        Moderator

        Let's see the code that fails and show us where it fails, please.  It's difficult to help without more details.