locked
Is there a way to determine if a Coded Ui Test is runing from another process? RRS feed

  • Question

  • Hi!

    I want to check from another application if there are running Coded Ui Tests on the computer.
    Is there a way to check from another process (or even a remote machine) to see if there are Tests running,
    without changing the test code?

    Is there a way?

    Tuesday, December 3, 2013 11:58 PM

Answers

  • Programs like Task manager and Process Explorer can show lots of details of the programs that are running. So you could write a program that accesses some of the same data that they access and search it for the executables and DLLs that Coded UI uses.

    Regards

    Adrian

    • Proposed as answer by Amanda Zhu Friday, December 13, 2013 1:40 AM
    • Marked as answer by Amanda Zhu Monday, December 16, 2013 1:56 AM
    Thursday, December 5, 2013 12:48 PM
  • Hi,

    As far as I know, when you run Coded UI test from Visual Studio IDE, vstest.discoveryengine* process, vstest.executionengine* process and devenv.exe process will be called. The vstest.executionengine* process is used to run tests.

    When you run coded UI test from MSTest command line, MSTest.exe process will be called.

    You can check using Process Monitor: http://technet.microsoft.com/en-us/sysinternals/bb896653 to inspect those running process during test running.

    As for how you can accomplish it programmatically, sorry for that I am not programming expert, and I think that it is out of our support range because it is more related to programming. You can consult on Visual Studio Language Forums: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages to check whether they can provide you some code/ways to programmatically access a process or accesses some of the same data that the processes access and search it for the executables and DLLs that Coded UI uses as Adrian suggested.

    Thank you for your understanding.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Friday, December 13, 2013 1:40 AM
    • Marked as answer by Amanda Zhu Monday, December 16, 2013 1:56 AM
    Monday, December 9, 2013 4:40 AM

All replies

  • Hi,

    When you running Coded UI test on a machine, if you see the playback of some actions on the desktop session, then you can say the Coded UI test is running.

    You also can run coded UI test on a remote machine using test controller and test agent. In this case, you will see whether test is running through ‘Currently running test’ and ‘Test progress’ in ‘Test Agent Status’ window which is on the test agent machine when you run coded UI test remotely.

    Reference:

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 4, 2013 5:02 AM
  • Hehe.

    As mentioned, I want to check it from within another process not manually.

    Wednesday, December 4, 2013 11:00 PM
  • Hi,

    If my suggestions in the previous reply can’t meet your requirement, I know that we can call coded UI tests from another application. Reference:

    http://blogs.microsoft.co.il/shair/2010/07/15/running-codedui-test-from-another-application/

    If you just want a tool to check whether there are coded UI test running on a local machine or remote machine, as far as I know there is no such tool.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Amanda Zhu Thursday, December 5, 2013 3:18 AM edit
    Thursday, December 5, 2013 3:17 AM
  • Programs like Task manager and Process Explorer can show lots of details of the programs that are running. So you could write a program that accesses some of the same data that they access and search it for the executables and DLLs that Coded UI uses.

    Regards

    Adrian

    • Proposed as answer by Amanda Zhu Friday, December 13, 2013 1:40 AM
    • Marked as answer by Amanda Zhu Monday, December 16, 2013 1:56 AM
    Thursday, December 5, 2013 12:48 PM
  • Ok maybe I can make it more clear.

    There is a Coded UI Test solution.
    I can use Visual Studio, MSTest or the TestAgent to execute the test of this project.

    Now I have a totally different .Net application. In this Application I want to know if there are tests running.
    Till now I didn't find that there is an additionally process started when tests are executed.

    Thursday, December 5, 2013 11:07 PM
  • Hi,

    If you run coded UI test using Visual Studio, the devenv.exe process will run.

    Do you mean that you are developing a .net application for detecting whether there are tests running on the machine?

    In this case, I think it is possible to accomplish it programmatically. You can check the Task Manager. Maybe you can track and detect the devenv.exe process programmatically to accomplish it.

    Reference:

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Amanda Zhu Monday, December 9, 2013 3:04 AM edit
    Friday, December 6, 2013 3:32 AM
  • Do you mean that you are developing a .net application for detecting whether there are tests running on the machine?

    Yes that is it.

    >> You can check the Task Manager, you will find that running tests will be under devenv.exe process when you run tests

    No. devenv.exe is not a sufficient requirement for running tests. 
    If running tests trough Visual Studio it is a necessary requirement. But if Visual Studio i running that does not need to mean that tests are running.

    >> Maybe you can track and detect the devenv.exe process programmatically to accomplish it

    yes, but the question is how ...

    And what is with the execution trough MSTest ...

    I didn't find a way to look into the processes to see whether there is  test running or not.

    Friday, December 6, 2013 1:42 PM
  • Hi,

    As far as I know, when you run Coded UI test from Visual Studio IDE, vstest.discoveryengine* process, vstest.executionengine* process and devenv.exe process will be called. The vstest.executionengine* process is used to run tests.

    When you run coded UI test from MSTest command line, MSTest.exe process will be called.

    You can check using Process Monitor: http://technet.microsoft.com/en-us/sysinternals/bb896653 to inspect those running process during test running.

    As for how you can accomplish it programmatically, sorry for that I am not programming expert, and I think that it is out of our support range because it is more related to programming. You can consult on Visual Studio Language Forums: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=vslanguages to check whether they can provide you some code/ways to programmatically access a process or accesses some of the same data that the processes access and search it for the executables and DLLs that Coded UI uses as Adrian suggested.

    Thank you for your understanding.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Friday, December 13, 2013 1:40 AM
    • Marked as answer by Amanda Zhu Monday, December 16, 2013 1:56 AM
    Monday, December 9, 2013 4:40 AM