最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

量角器:获取[DEP0018]弃用警告和测试运行随机终止

IT培训 admin 5浏览 0评论

量角器:获取[DEP0018]弃用警告和测试运行随机终止

我使用最新的量角器版本5.2.2与节点8.9.3和npm 5.6.0我有大约30个测试套件,每个测试套件大约有150个测试用例。所有这些都在我的本地运行良好,但当我在Jenkins机器上运行它们使用具有Windows和完全相同的节点和量角器版本的grunt我随机得到以下错误并且执行被卡住直到我杀死Jenkins作业。

(node:3060) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TimeoutError: timeout
(Session info: chrome=63.0.3239.84)
(Driver info: chromedriver=2.34.522940 
(1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 6.3.9600 x86_64)
(node:3060) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3060) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
A Jasmine spec timed out. Resetting the WebDriver Control Flow.

失败是随机发生的,而不是在某个测试用例之后。因此,有时它会在启动时失败,有时在中间,有时在最后一个测试用例时失败。

我尝试过使用seleniumAddress和direcConnect但问题相同。这浪费了我很多时间,仍然困在我开始的地方。任何帮助都将受到高度赞赏。

回答如下:

错误堆栈告诉你根本原因'A Jasmine规范超时'。这意味着某些规范需要花费很长时间才能完成,超出时间。

我认为在Jenkins机器上运行的网站比你当地的网站慢。

请阅读下面的量角器网站链接,您将找到解决方案。 http://www.protractortest/#/timeouts#timeouts-from-jasmine

exports.config = {

    allScriptsTimeout: 120 * 1000,

    jasmineNodeOpts: {
        defaultTimeoutInterval: 120 * 1000,
        onComplete: null,
        isVerbose: true,
        showColors: true,
        includeStackTrace: true,
        realtimeFailure: true
    },
    ... 
};

量角器:获取[DEP0018]弃用警告和测试运行随机终止

我使用最新的量角器版本5.2.2与节点8.9.3和npm 5.6.0我有大约30个测试套件,每个测试套件大约有150个测试用例。所有这些都在我的本地运行良好,但当我在Jenkins机器上运行它们使用具有Windows和完全相同的节点和量角器版本的grunt我随机得到以下错误并且执行被卡住直到我杀死Jenkins作业。

(node:3060) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TimeoutError: timeout
(Session info: chrome=63.0.3239.84)
(Driver info: chromedriver=2.34.522940 
(1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 6.3.9600 x86_64)
(node:3060) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3060) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
A Jasmine spec timed out. Resetting the WebDriver Control Flow.

失败是随机发生的,而不是在某个测试用例之后。因此,有时它会在启动时失败,有时在中间,有时在最后一个测试用例时失败。

我尝试过使用seleniumAddress和direcConnect但问题相同。这浪费了我很多时间,仍然困在我开始的地方。任何帮助都将受到高度赞赏。

回答如下:

错误堆栈告诉你根本原因'A Jasmine规范超时'。这意味着某些规范需要花费很长时间才能完成,超出时间。

我认为在Jenkins机器上运行的网站比你当地的网站慢。

请阅读下面的量角器网站链接,您将找到解决方案。 http://www.protractortest/#/timeouts#timeouts-from-jasmine

exports.config = {

    allScriptsTimeout: 120 * 1000,

    jasmineNodeOpts: {
        defaultTimeoutInterval: 120 * 1000,
        onComplete: null,
        isVerbose: true,
        showColors: true,
        includeStackTrace: true,
        realtimeFailure: true
    },
    ... 
};
发布评论

评论列表 (0)

  1. 暂无评论