0

The Coded UI test cases executed with Run functional tasks exit with the following error message: "The agent process was stopped while the test was running." These test cases were executed successfully before and the error description is not clear to investigate further and resolve the issue. Could you please share some information on the root cause and the probable solutions for the same. Thanks in advance.

Error message:

[error]System.Exception: Some tests in the test run did not pass, failing the task.

Environment Details: TFS on-premises , TFS 2017 15.112.26307.0 (Tfs2017.Update1)

Build Agent : Private, OS: Windows Server 2012 R2, build agent version : 2.112.0

Test Agent : Private, OS: Windows 10

Test deployment task version: vstf_testagent.exe version version 14.0.23107.10

1 Answer 1

1

According to the error message "Some tests in the test run did not pass, failing the task." In your test log you should see something like this :

Test run '5262' is in 'InProgress' state.
2017-03-22T09:04:32.3083813Z DistributedTests: Please use this link to analyze the test run : xxxx

You can navigate to the Test Runs in the Test Hub to get more info for further troubleshoot.

The root cause should be that :

Automation engine is unable to playback the test because it is not able to interact with the desktop. This could happen if the computer running the test is locked or it’s remote session window is minimized.

So, you can check if the test works with an open Remote Desktop session, if it works, it should exactly be the issue.

Solution:

To fix that and get better experiences you can install the Autologon tool,

This logs in the server automatically and creates the interactive desktop. But you do not need a remote desktop or something.

After installing the autologon tool, configure the tool to use the account to run the tests, and rebooted the server. Then try it again.

Reference this article: Run Functional (Coded) UI Tests in your VSTS Release Pipeline

3
  • Under Test-> Runs the error message states as follows"The agent process was stopped while the test was running." Will install Autologon and see if the issue is resolved as recommended. Thank You.
    – Santhosh
    Commented Oct 18, 2017 at 15:06
  • @Santhosh Have you resolved the issue by the Autologon installed? Commented Oct 24, 2017 at 9:31
  • Yes the issue has been resolved after installation Autologon tool, Thanks for the support.
    – Santhosh
    Commented Oct 29, 2017 at 4:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.