从 Windows 服务启动 IE(或多或少)

发布于 2024-07-15 21:58:25 字数 608 浏览 10 评论 0原文

我想使用 CruiseControl.net 作为服务,并让它启动 Fitnesse 测试运行程序作为一项任务,以使用启动 IE 的 watin 夹​​具来运行一堆验收测试。 哦,我想在虚拟服务器上完成这一切。

如果我没有将 CC.Net 作为服务运行(即通过远程桌面登录服务器并从桌面启动 CCNet.exe),以上所有内容都可以正常工作。

我很确定仅仅将 CC.Net 服务标记为“允许与桌面交互”是不够的(它是一个虚拟服务器,所以可能甚至没有 winstation0)。 虽然我没有专门尝试过这个(过去我尝试将 Fitnesse 作为服务运行,但它无法通过 watin 固定装置启动 IE...所以我非常有信心“允许与桌面交互”将是更多需要)。

我想我需要一个 .exe 来创建一个 winstation,以特定用户身份登录,然后启动 IE(实际上可能只是一个 shellexecute,所以我不会仅限于 ie)。

过去有人做过类似的事情吗? 有什么具体的陷阱吗? 这值得做吗...还是我应该做一个远程桌面然后断开连接?

请注意,这里的总体目标是拥有一个可靠 CC.Net 进程,该进程调用 Fitnesse,而 Fitnesse 又调用 IE。

I want to use CruiseControl.net as a service and have it launch the Fitnesse test runner as a task to run a bunch of acceptance tests using the watin fixture which starts IE. Oh and I want to do this all on a virtual server.

The above all works fine if I'm not running CC.Net as a service (ie. log in to the server via remote desktop and launch the CCNet.exe from the desktop).

I'm pretty sure just marking the CC.Net service as "allow interaction with desktop" won't be enough (it's a virtual server so there may not even be a winstation0). Though I haven't specificially tried this (in the past I tried running Fitnesse as a service and it couldn't start IE via the watin fixture... so I'm pretty confident that more that "allow interaction with desktop" will be needed).

I'm thinking I'll need a .exe that can create a winstation, log on as a specific user, and then launch IE (actually maybe just a shellexecute so I would not be limited to just ie).

Has anyone done anything similar in the past? Any specific pitfalls? Is this worth doing... or should I just do a remote desktop and then disconnect?

Note that the overall goal here is to have a reliable CC.Net process that invokes Fitnesse which in turn invokes IE.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

固执像三岁 2024-07-22 21:58:25

根据我的经验,您需要有人登录控制台才能使 IE 能够从服务启动。

如果它在安全位置的服务器上运行,您只需将其设置为自动登录,如本文所述 http://support.microsoft.com/kb/324737

如果您想更聪明一点,您可以设置一个自动启动任务,该任务也会在启动时锁定计算机。 http://forums.techarena.in/windows-xp-support/621461。 htm

我发现的唯一例外是 SWEA (http://webiussoft.com/ ) “SWEA 实现了 Web 浏览器的自动化,并为功能测试和回归测试自动化提供了解决方案。”

我们在运行 CruiseControl.NET 作为服务的构建服务器上运行 SWEA 测试。

我不知道为什么 SWEA 可以作为服务工作,而其他任何东西都不能:-(

In my experience you need to have someone logged on at the console for IE to be able to be started from a service.

If this is running on a server in a secure location you could just set it to automatically logon as explained in this article http://support.microsoft.com/kb/324737

If you want to be a bit cleverer, you can set up an automated startup task that will lock the machine on startup as well. http://forums.techarena.in/windows-xp-support/621461.htm

The only exception to this that I have found is SWEA (http://webiussoft.com/) "SWEA automates Web Browser and provides solution for functional test and regression test automation."

We run SWEA tests on our build server running CruiseControl.NET as a service.

I have no idea why SWEA can work as a service, whilst nothing else can :-(

許願樹丅啲祈禱 2024-07-22 21:58:25

您还可以从命令行运行 CC.Net(而不是将其作为服务运行)。 效果很好。

You could also run CC.Net from the commandline (instead of running it as a service). Works great.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文