locked
Unit test agent setting RRS feed

  • Question

  • Hi, friends

    I am investigating a unit test failing problem, and I need your help.

    Description:
         We have two branchs with the same code to execute unit test,  for the same unitTest.dll

         serv 1,  shown that half number of unit test cases failed ,  and half number of unit test case skipped.

                   1) output result cleanupScript.log show that TotalAgents=2

                   2) virtual computer A is test controller ,have two test agents. virtual computer A also as a test agent,

                        Another test agent is virtual computer B in the same physical computer

                   3) Test Failure Summary:
                        Assembly unitTest.dll failed. Total: 836, Passed: 418, Failed: 0, Other: 418 Click here for details


        serv 2,  all unit test cases executed.

                     1)output result cleanupScript.log show that TotalAgents=1
                     2)virtual computer C is test controller , have two test agents. virtual computer C also as a test agent,
                       Another test agent is virtual computer B in the another physical computer
                     3)Test Failure Summary:
                      Assembly unitTest.dll Passed . Total: 836, Passed: 836, Passed: 0, Other: 0 Click here for details    

    Question:
          
         why unitTest.dll  in serv1 is allocated to two agents? and why half number of the test cases in serv1 are skipped?

         Is virtual machine have connection with test agent allocation?

    • Moved by Limitxiao Gao Tuesday, June 20, 2017 2:38 AM Related to Unit Test
    Monday, June 19, 2017 9:36 AM

All replies

  • Hi,

    This forum is discussing Team Foundation Server. Your issue is related to Unit Test. I will move this thread to corresponding forum.

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 20, 2017 2:37 AM
  • Hi friend,

    Welcome to MSDN forum.

    >>why unitTest.dll in serv1 is allocated to two agents? and why half number of the test cases in serv1 are skipped?

     Please allow me to ask a few questions.

    1. In serv1, how did you configure the test controller and test agent? Did you set the “Bucket size” in test settings file?

    One agent can only execute one test once a time, and if a catastrophic error occur during execution the run may be aborted leaving many tests unexecuted. “Bucket” helps the test cases to execute simultaneously on different agent machines. Once the agents finish the execution of a bucket of tests, it is given another one if more exist. The default value of the bucket size is 100.

    Please see section ‘Miscellaneous’, ‘Examples of Agent Selection and Scheduling’ for some example test run submissions in this blog:

    https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/02/08/understanding-the-visual-studio-load-agent-controller/

    And this blog describes how to run automated tests on different machines in parallel:

    https://blogs.msdn.microsoft.com/aseemb/2010/08/11/how-to-run-automated-tests-on-different-machines-in-parallel/

    2. How did you run test? Did you run test remotely in VS IDE or with TFS? Is the test agent ready status from Manage Test Controllers Window?

    If the agent’s status is not ready, then test case assigned will not be executed.

    In addition, I found a thread describe test skipped when run using remote test agent

    https://social.msdn.microsoft.com/Forums/en-US/5910b67f-e054-496a-8e3e-2b13acca531e/test-skipped-when-try-to-run-using-remote-test-agent-via-configuration-in-testsettings?forum=vstest

    Please feel free let me know if you need more help.

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    • Edited by Fletch Zhou Thursday, June 22, 2017 8:57 AM
    • Proposed as answer by Fletch Zhou Thursday, June 22, 2017 8:57 AM
    Tuesday, June 20, 2017 6:55 AM