Selenium和节点重播

时间:2014-07-30 16:22:35

标签: node.js angularjs selenium protractor angularjs-e2e

您好我无法将节点重播连接到selenium(我正在为我的angularjs应用程序运行量角器测试)。

我的测试用grunt运行:     咕噜咕噜咕噜咕噜

他们工作正常。

但是现在我已经安装了node-replay并将以下行添加到我的测试文件中:

var Replay = require('replay');
Replay.localhost('127.0.0.1:9000/');

当我尝试在记录模式下运行节点重播时,我的所有测试都失败了

 REPLAY=record grunt protractor

即使我在' 127.0.0.1:9000 /'本地运行我的测试我是否必须将有关节点重放的任何内容添加到我的量角器配置文件中?

1 个答案:

答案 0 :(得分:0)

看起来127.0.0.1被视为与localhost相同,这意味着node-replay将代理所有请求而不记录它们。 (类似于运行replay = CHEAT)

https://github.com/assaf/node-replay/commit/87da96f01bfbaa23ee49c0156ba6d369e7b50cd6