Forum Discussion

cam_farineau's avatar
cam_farineau
Contributor
8 years ago

Tasks set at running state even when test run is complete

Hi,

 

We have a master project that start our UI tests (slave project with different tests group) on different hosts (VM). We have a task for each VM.

We are using TeamCity to start our tests. There is a queue with our UI Tests and after two other project: WebTesting and LoadTests.

 

But sometimes one of the test group on a VM is complete but the task doesn't come back as idle and stays at running state. 

This is an issue as TestExecute (running the Master Project) will keep on waiting for all tasks to finish, but since one task is stuck at running state, TestExecute will not stop.

Then the other project WebTesting and LoadTests in the queue will not start because TestExecute is still running.

 

Do you have any solution about that ? Why our tasks are staying sometimes on running state after our tests are done ?

 

Thank you for your answers,

 

Camille

 

  • After Test Completion.Kill Test execute Process.

     

     

     Const strComputer = "." 
      Dim objWMIService, colProcessList
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
      Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'TestExecute.exe'")
      For Each objProcess in colProcessList 
        TestExecute.Terminate() 
      Next  
    • cam_farineau's avatar
      cam_farineau
      Contributor

      Yes we can kill the process after the tests are done. But that will require to kill TestExecute from TestExecute.

      And this doesn't help me to know why the tasks are still on running state even if the tests are done.