2017-05-08 15 views
-1

私はずっと数時間で分裂器に苦労していましたが、私は最初の試練をすることさえできませんでした。それを起動するには、私は次のエラーを生成する、npm run e2eを使用しています:分度器のエラー

ERR! code ELIFECYCLE 
[1] npm ERR! errno 1 
[1] npm ERR! [email protected] protractor: `protractor 
protractor.config.js` 
[1] npm ERR! Exit status 1 
[1] npm ERR! 
[1] npm ERR! Failed at the [email protected] protractor script 'protractor protractor.config.js'. 
[1] npm ERR! Make sure you have the latest version of node.js and npm installed. 
[1] npm ERR! If you do, this is most likely a problem with the angular-quickstart package, 
[1] npm ERR! not with npm itself. 
[1] npm ERR! Tell the author that this fails on your system: 
[1] npm ERR!  protractor protractor.config.js 
[1] npm ERR! You can get information on how to open an issue for this project with: 
[1] npm ERR!  npm bugs angular-quickstart 
[1] npm ERR! Or if that isn't available, you can get their info via: 
[1] npm ERR!  npm owner ls angular-quickstart 
[1] npm ERR! There is likely additional logging output above. 
[1] 
[1] npm ERR! A complete log of this run can be found in: 
[1] npm ERR!  C:\Users\Jesper\AppData\Roaming\npm-cache\_logs\2017-05-08T22_41_36_233Z-debug.log 
[1] npm run protractor exited with code 1 
--> Sending SIGTERM to other processes.. 
[0] npm run serve:e2e exited with code 1 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] e2e: `concurrently "npm run serve:e2e" "npm 
run protractor" --kill-others --success first` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] e2e script 'concurrently "npm 
run serve:e2e" "npm run protractor" --kill-others --success first'. 
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 angular-quickstart 
package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-quickstart 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular-quickstart 
npm ERR! There is likely additional logging output above. 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:\Users\Jesper\AppData\Roaming\npm-cache\_logs\2017-05- 
08T22_24_18_355Z-debug.log 

私はこの時点で何をすべきか全く見当がつかない。このエラーを修正するにはどうすればよいですか? nodes.jsとnpmの両方を更新しました。彼らのバージョンは、それぞれ6.10.3と4.5.0になりました。

また、私は2つの設定ファイルを持っているかどうかわかりません。 フォルダーにあるconfig.jsファイルを作成するよう指示されたガイドが見つかりました。私はまた、protractor.config.jsというファイルを見つけました。デフォルトでは、angle-quickstartプロジェクトにあったと思います。どちらも必要ですか?conf.jsを削除する必要がありますか?

ここでは、ログファイルの内容です:

0 info it worked if it ends with ok 
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 
1 verbose cli 'C:\\Users\\Jesper\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 
1 verbose cli 'run', 
1 verbose cli 'e2e' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose run-script [ 'pree2e', 'e2e', 'poste2e' ] 
5 info lifecycle [email protected]~pree2e: [email protected] 
6 verbose lifecycle [email protected]~pree2e: unsafe-perm in lifecycle true 
7 verbose lifecycle [email protected]~pree2e: PATH: C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Skype\Phone\;C:\Users\Jesper\AppData\Roaming\npm;C:\Users\Jesper\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin 
8 verbose lifecycle [email protected]~pree2e: CWD: C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database 
9 silly lifecycle [email protected]~pree2e: Args: [ '/d /s /c', 'npm run build:e2e' ] 
10 silly lifecycle [email protected]~pree2e: Returned: code: 0 signal: null 
11 info lifecycle [email protected]~e2e: [email protected] 
12 verbose lifecycle [email protected]~e2e: unsafe-perm in lifecycle true 
13 verbose lifecycle [email protected]~e2e: PATH: C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Skype\Phone\;C:\Users\Jesper\AppData\Roaming\npm;C:\Users\Jesper\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin 
14 verbose lifecycle [email protected]~e2e: CWD: C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database 
15 silly lifecycle [email protected]~e2e: Args: [ '/d /s /c', 
15 silly lifecycle 'concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first' ] 
16 silly lifecycle [email protected]~e2e: Returned: code: 1 signal: null 
17 info lifecycle [email protected]~e2e: Failed to exec e2e script 
18 verbose stack Error: [email protected] e2e: `concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first` 
18 verbose stack Exit status 1 
18 verbose stack  at EventEmitter.<anonymous> (C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16) 
18 verbose stack  at emitTwo (events.js:106:13) 
18 verbose stack  at EventEmitter.emit (events.js:191:7) 
18 verbose stack  at ChildProcess.<anonymous> (C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14) 
18 verbose stack  at emitTwo (events.js:106:13) 
18 verbose stack  at ChildProcess.emit (events.js:191:7) 
18 verbose stack  at maybeClose (internal/child_process.js:886:16) 
18 verbose stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 
19 verbose pkgid [email protected] 
20 verbose cwd C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database\e2e 
21 verbose Windows_NT 10.0.14393 
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jesper\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e" 
23 verbose node v6.10.3 
24 verbose npm v4.5.0 
25 error code ELIFECYCLE 
26 error errno 1 
27 error [email protected] e2e: `concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first` 
27 error Exit status 1 
28 error Failed at the [email protected] e2e script 'concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first'. 
28 error Make sure you have the latest version of node.js and npm installed. 
28 error If you do, this is most likely a problem with the angular-quickstart package, 
28 error not with npm itself. 
28 error Tell the author that this fails on your system: 
28 error  concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first 
28 error You can get information on how to open an issue for this project with: 
28 error  npm bugs angular-quickstart 
28 error Or if that isn't available, you can get their info via: 
28 error  npm owner ls angular-quickstart 
28 error There is likely additional logging output above. 
29 verbose exit [ 1, true ] 

そして、ここに私のフォルダ構造があります:私は把握できるものから

enter image description here

+0

ここでpackage.jsonの内容をペーストすることはできますか? debug.logには、テストスクリプトを実行する前にpackage.json内のいくつかの前段階が設定されています。これらの前工程によって故障が引き起こされるべきである。 – yong

答えて

0

は、エラーメッセージがしたときに表示されることになっていますテストは失敗しましたが、私は理由が分かりません。何か問題があると思う私のような新しいユーザーにとっては混乱するかもしれません。

+0

このELIFECYCLEエラーは、「npm」で分度器スイートを実行するとスローされます。これは非常に面倒なログになりますが、あなたの分度器が1つのテストケースでも失敗しても期待されます。 – LostJon

0

あなたの最善の策は、私はこのサイトをお勧めし、基本を読み取るために、次のようになります。 http://www.softwaretestinghelp.com/protractor-testing-tutorial/

あなたの分度器のテストを開始するには2つのファイルを必要とします。 1つのファイルはconf.jsで、もう1つはテストを格納しているファイル(spec.js、test.spec.js)です。あなたのconfファイルに正しいスペックファイル名が書かれていることを確認してください:

// conf.js 
exports.config = { 
    framework: 'jasmine', 
    seleniumAddress: 'http://localhost:4444/wd/hub', 
    specs: ['spec.js'] //spec file name 
}