Windows Phone 测试框架 - NuGet - 测试新应用程序

发布于 2025-01-04 17:40:02 字数 943 浏览 3 评论 0 原文

我已按照此视频中的测试应用示例进行操作。我还使用以下命令为端口 8085 创建了 ACL。 (Mydomain 和 myusracc 是我的工作域和用户帐户)

netsh http add urlacl url=http://+:8085/ user=<mydomain>\<myusracc>

当我在调试模式下运行解决方案时,出现以下错误:

http://localhost:8085/phoneAutomation/automate 上没有侦听端点可以接受消息。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。

我尝试执行 SpecFlow 场景,但出现以下异常:

App not alive - ping failed
  Expected: True
  But was:  False

我运行命令来查看哪些端口正在侦听(netstat -an |find /i“侦听”),但找不到 8085

如果我再次运行 netsh 命令来创建ACL 时,我收到一条消息,指出 URL 已存在,并列出如下:

Reserved URL            : http://+:8085/
   User: <mydomain>\<myusername>
       Listen: Yes
       Delegate: No
       SDDL: D:(A;;GX;;;S-1-5-21-xxxxxxxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxx)

I have followed your test app example from this video. I have also created the ACL for port 8085 using below command. (with Mydomain and myusracc being my work domain and user account)

netsh http add urlacl url=http://+:8085/ user=<mydomain>\<myusracc>

When I run the solution in debug mode, I'm getting below error:

There was no endpoint listening at http://localhost:8085/phoneAutomation/automate that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

I tried executing the SpecFlow scenarios, I get below exception:

App not alive - ping failed
  Expected: True
  But was:  False

I ran the command to see which ports are lisening, (netstat -an |find /i "listening") and couldn't find 8085

If I ran the netsh command again to create the ACL, I get a message saying URL is already there and is listed as follows:

Reserved URL            : http://+:8085/
   User: <mydomain>\<myusername>
       Listen: Yes
       Delegate: No
       SDDL: D:(A;;GX;;;S-1-5-21-xxxxxxxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxx)

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

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

发布评论

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

评论(1

预谋 2025-01-11 17:40:02

我有同样的问题以及我对第二个问题的发现: manual GitHub 上的示例部分不正确,我使用源代码中的示例 - 它们工作正常。

尝试将您的 SpecFlow 功能更改为:

Feature: MainPage
    In order to test my app
    As a WP7 Developer
    I want to see it start and take a picture of it

Scenario: Main Page loads after a few seconds
    Given my app is clean installed and running
    Then take a picture

I has the same questions and what I have found about second question: manual at GitHub isn't correct in example part and I use their examples from source code - they work fine.

Try to change your SpecFlow feature to something like:

Feature: MainPage
    In order to test my app
    As a WP7 Developer
    I want to see it start and take a picture of it

Scenario: Main Page loads after a few seconds
    Given my app is clean installed and running
    Then take a picture
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文