问题标签 [gulp-protractor]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
2370 浏览

angularjs - Gulp-protractor keep saying "Spec patterns did not match any files"

I'm trying to run my end to end tests written with protractor and jasmine. It works perfectly when I call protractor protractor.config.js directly.

However, when I use gulp-protractor, I keep getting the "Spec patterns did not match any files" error and the tests do not run.

This is my protractor runner gulp task:

and this is the error:

What am I missing?

0 投票
3 回答
1041 浏览

jenkins - 在 Windows Jenkins 从节点上运行 Protractor 的问题

尝试在 Windows Jenkins 从属节点上的 IE11 上运行 Protractor 时遇到问题。

当我通过远程桌面连接时,我可以毫无问题地运行 Protractor。但是,当我尝试从 Jenkins 运行 Protractor 时,我遇到了这个问题:

这很奇怪,因为我可以使用任何其他浏览器运行相同的测试。以下是我尝试过的一些事情:

有什么我想念的吗?

0 投票
5 回答
4629 浏览

node.js - Gulp Protractor: selenium webdriver exited status 1

I've been using Bangular (an excellent MEAN stack Yeoman generator) to create a project and all was going well until I did a recent series of npm updates to the project. Now on my project (and on their project too) I get an error when running their gulp-protractor task (which worked fine in the past).

I have included full output for reference, in case it helps - error is half way down (scroll the code box):

I'm not sure what the error code means (as in '1' means 'not passing', but what does that mean - was it tests that failed, or the did the driver crash out for some reason??

I'm pretty sure that it's an issue of packages not working well together as they are updated; I'm just hoping that someone can throw light on it, or may have experienced similar recently in some way...

Thanks

UPDATE

On initial investigation it appears that this problem doesn't occur with selenium version 2.45.0. Now, exactly where in the chain of 'gulp protractor -> protractor -> webdriver -> selenium' that error occurs is up for discussion. I think this is going to end with an automation patch being required or... :/

0 投票
0 回答
122 浏览

angularjs - 如何基于“for循环”在量角器中调用require?

我正在使用 require 在量角器中调用多个 .js 文件。我需要使用 for 循环(对于 require 函数)多次调用 js 文件。

我需要将多个元素传递给另一个需要文件。(集合)。问题是,对于一个循环,要求只工作一次。(对于任何最大值)。

对于 "i" 的每个值,必须执行要求文件,而它只执行一次。

0 投票
0 回答
193 浏览

selenium - 无法配置 webdriver-manager 驱动程序版本

我们想为 webdriver-manager 指定驱动程序版本,因为可以配置浏览器类型,以便我们可以在需要时使用旧版本运行测试。目前似乎只有浏览器可以从外部配置。

来自 webdriver-manager 文件的 webdriver_update 函数的代码:

正如所观察到的,这些版本取自量角器基本目录的 config.json

有没有办法甚至解决方法来指定此文件中定义的最新版本以外的版本?

另一个我们遇到的问题:目前ie驱动类型(是Win32还是64)仅基于运行测试的操作系统。能够在 64 位机器上下载 32 位版本的 IE 驱动程序会很有帮助,因为 64 位版本与 32 位版本相比确实很慢。有什么解决办法吗?

现在这是我们处理自动 ie 驱动程序下载/更新的方式:

预先感谢您的回答!

0 投票
1 回答
670 浏览

selenium-webdriver - 关闭 selenium-webdriver 连接时量角器测试失败

问题

我正在尝试让 AppVeyor 使用 Protractor 和 Selenium-webdriver 运行一些 e2e 测试。

在我的本地机器上一切正常,但是当在 AppVeyor 量角器上构建和测试时,由于 selenium-webdriver 中未找到方法,它似乎以代码 1 退出。我试图获取有关错误消息的一些信息,但我的搜索没有找到任何地方。大部分结果来自使用 Java 进行的后端测试。

这是构建日志的片段:

selenium 服务器正在运行,测试通过但当服务器即将关闭时发生错误。

设置

在构建开始时,我运行npm install它又node_modules\\.bin\\webdriver-manager update --standalone作为安装后脚本运行。

Protractor 使用 gulp-protractor 插件运行 gulp 任务,并且 selenium 独立 jar 在 protractor 配置中定义,如下所示:

完整的构建日志可以在这里看到:https ://ci.appveyor.com/project/Crevil/kitos/build/1.0.187 为嘈杂的日志道歉。控制台中的部署日志非常响亮,并且无法在 AppVeyor 上进行配置。

本地日志信息

如前所述,一切都在我的本地机器上运行良好。这是量角器运行的日志。

0 投票
1 回答
935 浏览

javascript - gulp-protractor e2e 任务无法运行

更新:似乎这是 gulp-protractor 中的一个错误。在他们的 github 页面上,他们将其作为错误提交,并将对其进行研究。来源:https ://github.com/mllrsohn/gulp-protractor/issues/64

在解决错误之前,您唯一可行的解​​决方法是将项目目录更改为不包含空格的目录。


所以我试图让一个 Aurelia 项目开始,包括前端单元测试。这是问题开始的地方。当我尝试运行 e2e gulp 任务时,出现以下错误:

[10:45:44] 使用 gulpfile ~\Documents\Visual Studio 2013\Projects\ProjectX\ProjectX\gulpfile.js
[10:45:44] 开始 'build-e2e'...
[10:45:44] 完成'build-e2e' after 207 ms
[10:45:44] 开始'e2e'...
'C:\Users\jorisd\Documents\Visual' 不被识别为内部或外部命令、可运行程序或批处理文件。

C:\Users\jorisd\Documents\Visual Studio 2013\Projects\ProjectX\ProjectX\build\tasks\e2e.js:34
.on('error', function(e) {throw e; });

错误:量角器以代码 1 退出

基本上它是有问题的突出显示的代码。由于我的路径包含一个空格,它会因为某种原因停在那里。

这是我的 e2e.js 文件现在的样子:

问题在于使用 configFile 选项的 e2e 任务。
我尝试将行更改为以下内容:

但这也没有结果。如果你们中的任何人知道在 configFile 路径中包含空格的解决方法,我会很高兴听到它。

0 投票
1 回答
5574 浏览

automation - cucumberOpts.tags 与 Protractor + CucumberJs + Gulp 一起使用

大家好!

我安装了以下版本:

我已经安装了这个,因为该项目的 NPM 版本 < 4 并且 Protractor 3.0.0 需要它。

我有以下内容protractor.conf.js

我的 gulp 任务如下所示:

我用一个npm run test-e2e命令运行它,该命令运行一个只包含这两行的脚本

在上面的配置中,您可能会注意到我已经注释掉了该--cucumberOpts.tags选项,因为我无法让它工作,当我使用参数运行测试时,npm run test-e2e -- --baseUrl http://local.me --tag "@Test"就像它没有听到那个参数一样,因为我可以看到它执行了所有测试而不是标记的......

所以......我在这里做错了什么?

0 投票
1 回答
871 浏览

javascript - Protractor + CucumberJS + Gulp-Protractor = 测试失败时浏览器不会关闭

你好!

一旦测试失败,我正在尝试关闭浏览器,目前,当它通过时,它确实会关闭。

我在用着

我的 Gulp 量角器看起来像:

protractor.config有:

测试失败,浏览器保持打开状态,这在 CI 服务器上会导致内存泄漏!我该怎么做才能解决这个问题?

请帮忙!!

编辑 我失败的步骤如下所示:

0 投票
1 回答
805 浏览

angularjs - 量角器因 multiCapabilities 失败,但仅在一个测试运行时通过

我在使用“multiCapabilities”运行测试时遇到问题。我的 multiCapabilities 配置是:

我得到的回应是:

但是,当我使用此功能配置运行时,它会通过:

有没有人在并行运行时看到这个问题?我尝试了所有不同的浏览器组合,并单独禁用所有插件以查看它们是否与 multiCapabilities 不兼容,但问题似乎只是单独在并行版本中运行。

谢谢,泰勒