当规范失败时,如何从量角器的日志中删除npm错误?

当规范失败时,如何从量角器的日志中删除npm错误?

问题描述:

我已经使用上的ionic2茉莉量角器开始application.I有没有得到关于网络搜索清除两大疑惑:当规范失败时,如何从量角器的日志中删除npm错误?

1)当我的任何规格的失败试验,显示错误与npm错误,在如下图所示:

1) App Component navigates to the next pagr on click 
    - Expected 'Ionic Blank' to match 'Page1'. 

Executed 2 of 2 specs (1 FAILED) in 7 secs. 
[20:22:55] I/launcher - 0 instance(s) of WebDriver still running 
[20:22:55] I/launcher - chrome #01 failed 1 test(s) 
[20:22:55] I/launcher - overall: 1 failed spec(s) 
[20:22:55] E/launcher - Process exited with error code 1 

npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e-test" 
npm ERR! node v6.9.5 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] e2e-test: `protractor ./test-config/protractor.conf.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] e2e-test script 'protractor ./test-config/protractor.conf.js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  protractor ./test-config/protractor.conf.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs ionic-hello-world 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls ionic-hello-world 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\Lenovo\testing\npm-debug.log 

npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e" 
npm ERR! node v6.9.5 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] e2e: `npm run e2e-update && npm run e2e-test` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] e2e script 'npm run e2e-update && npm run e2e-test'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm run e2e-update && npm run e2e-test 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs ionic-hello-world 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls ionic-hello-world 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\Lenovo\testing\npm-debug.log 

2)什么是这些错误与日志的TE addtion背后的原因是什么?

NPM正在抛出错误,因为量角器报告错误 - 错误是您的测试失败。 'npm err'这一行是标准的NPM错误报告,旨在帮助人们使用外部软件包,并且通常没有很多有用的信息。

我发现你可以通过添加||来防止这种情况。对于npm脚本的末尾或通过用||调用它

npm e2e || true 

这是唯一真正有用的,如果一个错误将停止别的事情的发生 - 在我的情况,我需要一个詹金斯建立不失败:真。