我是 e2e 测试的新手。我想试试http://codecept.io/angular/
自从我使用https://github.com/AngularClass/angular2-webpack-starter Protractor/Jasmine启动我的应用程序以来,它已经在工作了。
据我了解,codecept 正在量角器之上工作。我已经正确安装了它,但是当我启动一个简单的测试时,我遇到了一个失败的错误。
这是我的 codecept.json :
{
"tests": "src/app/*_test.js",
"timeout": 10000,
"output": "./output",
"helpers": {
"Protractor": {
"url": "http://localhost:3000/",
"driver": "hosted",
"browser": "chrome",
"rootElement": "body"
}
},
"include": {
"I": "./steps_file.js"
},
"bootstrap": false,
"mocha": {},
"name": "front"
}
这是我的测试:
Feature('MyApp');
Scenario('First Test', (I) => {
I.amOnPage('/#/home');
});
这是错误日志:
MyApp --
First Test
• I am on page "/#/home"
✖ FAILED in undefinedms
✖ "after each" hook: finialize codeceptjs in 0ms
-- FAILURES:
1) MyApp: First Test:
Uncaught Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
有什么帮助吗?