【问题标题】:Coded UI Automated Test Case through Octopus Tentacle通过 Octopus Tentacle 编码的 UI 自动化测试用例
【发布时间】:2016-10-19 07:35:47
【问题描述】:

我正在尝试运行部署在虚拟机上的自动化测试用例,并尝试在 Octopus 部署工具的帮助下触发它。我在我的机器上安装了测试代理和 Octopus Tentacle。 Octopus 很好地触发了自动测试用例的 DLL。但是,当 Octopus 尝试运行测试用例时,它给了我一个错误,如下所示:-

Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process. For more information, see "How to: Set Up Your Test Agent to Run Tests That Interact with the Desktop" (http://go.microsoft.com/fwlink/?LinkId=255012)
Error    01:59:38
If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process. For more information, see "How to: Configure and Run Scheduled Tests After Building Your Application" (http://go.microsoft.com/fwlink/?LinkId=254735)

我在测试代理中设置了我的密码并将其设置为有吸引力的过程,但我仍然面临同样的问题。

我正在通过 Octopus 触发我的 DLL,如下所示。

 & "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "C:\MyWebaPP\Automated_test\Automated_test.dll"

我尝试了所有找到的方法。请帮助我。

提前致谢!!

【问题讨论】:

    标签: automated-tests coded-ui-tests vstest.console.exe vstest.console


    【解决方案1】:

    我们最近遇到了同样的问题。

    在研究过程中,我们在 Octopus 支持论坛上发现了以下帖子: http://help.octopusdeploy.com/discussions/questions/5080-tentacle-running-interactive-tests 我们还通过邮件联系了 Octopus Deploy,他们基本上给了我们相同的回复。

    虽然我们在“测试运行的计划任务”方法上没有运气,但我们最终设法通过将 Octopus Tentacle 作为进程而不是服务运行来使其工作。

    这里的挑战是确保 Tentacle 在我们的测试机器启动时启动。我们希望这能自动发生,因此每次 RDP 进入并启动进程是不可能的(这也导致 UI 测试运行的一些额外问题......)。

    最终的工作解决方案是安排一个任务,在机器启动时将 Octopus Tentacle 作为交互式进程启动(即直接运行Tentacle.exe),然后确保我们永远不会对这台机器进行 RDP。确保任务具有足够的权限,并且它“无论用户是否登录都运行”。另外,请记住禁用 Octopus Tentacle 服务的自动启动。

    编辑:我们在使该解决方案适用于我们所有环境时遇到了一些麻烦。似乎出于安全原因,较新版本的 Windows 对允许计划任务在没有用户登录时启动交互式进程持怀疑态度。

    我们再次搜索了可能的解决方案,发现了FireDaemon Pro (commercial software),它允许我们注册在域用户下运行的交互式 Windows 服务。不太确定它是如何工作的,但他们似乎能够从 session0 中的 Windows 服务运行 UI(UI 也是隔离的)。 Octopus Tentacle 启动时毫无怨言,UI 测试按照我们希望的方式运行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-25
      • 2015-05-14
      相关资源
      最近更新 更多