Protractor: Visual Studio ์ฝ”๋“œ์—์„œ ๊ฐ๋„๊ธฐ ํ…Œ์ŠคํŠธ๋ฅผ ๋””๋ฒ„๊น…ํ•˜๋Š” ๋™์•ˆ ์˜ค์ด ์˜ค๋ฅ˜๊ฐ€ ๋‚˜ํƒ€๋‚˜์ง€๋งŒ ์‹คํ–‰ ๋ชจ๋“œ์—์„œ๋Š” ๋ชจ๋“  ๊ฒƒ์ด ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2018๋…„ 04์›” 09์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: angular/protractor

์ธ์‚ฌํŒ€,

"๋น„์ฃผ์–ผ ์ŠคํŠœ๋””์˜ค ์ฝ”๋“œ"์—์„œ ๊ฐ๋„๊ธฐ ์˜ค์ด์˜ ๊ธฐ๋ณธ ์„ค์ •์„ ์ˆ˜ํ–‰ํ–ˆ์œผ๋ฉฐ ํ„ฐ๋ฏธ๋„์—์„œ ์‹คํ–‰ํ•  ๋•Œ ๋ชจ๋“  ๊ฒƒ์ด ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ Visual Studio ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด ๋””๋ฒ„๊ทธํ•˜๋ฉด ๋ฒ„์ „ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์ „ ์„ธ๊ณ„์ ์œผ๋กœ Cucumber๋ฅผ ์„ค์น˜ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๋กœ์ปฌ ๋””๋ ‰ํ† ๋ฆฌ์— npm install์„ ํ†ตํ•ด ์„ค์น˜ํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ๋‘ ๊ฐ€์ง€ ๋‹ค๋ฅธ ๋ฒ„์ „์„ ์œ ์ง€ํ•˜๊ณ  ์žˆ๋‹ค๋Š” ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค. ์–ด๋–ป๊ฒŒ ๊ทธ๊ฒƒ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๊นŒ?

์ด ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” ์‹คํ–‰ ๋ชจ๋“œ์—์„œ๋„ ๋‚˜ํƒ€๋‚˜์•ผ ํ•˜๋ฉฐ ๋””๋ฒ„๊ทธ ๋ชจ๋“œ์—์„œ๋งŒ ๋‚˜ํƒ€๋‚˜๋Š” ์ด์œ ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ์˜ค๋ฅ˜๋ฅผ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.

**[18:34:15] I/launcher - WebDriver ์ธ์Šคํ„ด์Šค 1๊ฐœ ์‹คํ–‰
logger.js:158
[18:34:15] I/local - ์…€๋ ˆ๋Š„ ๋…๋ฆฝ ์‹คํ–‰ํ˜• ์„œ๋ฒ„ ์‹œ์ž‘ ์ค‘...
logger.js:158
[18:34:16] I/local - Selenium ๋…๋ฆฝํ˜• ์„œ๋ฒ„๊ฐ€ http://10.12.2.155:60837/wd/hub ์—์„œ ์‹œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
logger.js:158
์ฒ˜๋ฆฌ๋˜์ง€ ์•Š์€ ๊ฑฐ๋ถ€ ์˜ค๋ฅ˜:
debuggability.js:868
์˜ค์ด ์„ค์น˜๋ฅผ ์‹คํ–‰ ์ค‘์ธ ๊ฒƒ์œผ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค(๋Œ€๋ถ€๋ถ„ ๊ธ€๋กœ๋ฒŒ ์„ค์น˜)
๋กœ์ปฌ ์„ค์น˜(์ง€์› ํŒŒ์ผ์— ํ•„์š”ํ•œ ๊ฒƒ)์™€ ๋‹ค๋ฆ…๋‹ˆ๋‹ค.
์˜ค์ด๊ฐ€ ์ž‘๋™ํ•˜๋ ค๋ฉด ์ง€์› ํŒŒ์ผ์— ํ•„์š”ํ•œ ๊ฒƒ๊ณผ ๋™์ผํ•œ ์„ค์น˜๋ฅผ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
ํ…Œ์ŠคํŠธ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด ๋กœ์ปฌ์— ์„ค์น˜๋œ ๋ฒ„์ „์„ ์‹คํ–‰ํ•˜์‹ญ์‹œ์˜ค.
์‹คํ–‰ ๊ฒฝ๋กœ: D:\Prog Test\protractor-cucumber-master\node_modules\cucumber\lib\index.js
๋กœ์ปฌ ๊ฒฝ๋กœ: d:\Prog Test\protractor-cucumber-master\node_modules\cucumber\lib\index.js

D:\Prog Test\protractor-cucumber-master\node_modules\cucumbersrc\cli\install_validator.js:17:11์—์„œ
Generator.next์—์„œ ()
Generator.tryCatcher์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\util.js:16:23)
PromiseSpawn._promiseFulfilled์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\generators.js:97:49)
Promise._settlePromise์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\promise.js:574:26)
Promise._settlePromise0์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\promise.js:614:10)
Promise._settlePromises์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\promise.js:693:18)
Async._drainQueue์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\async.js:133:16)
Async._drainQueues์—์„œ (D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\async.js:143:10)
Immediate.Async.drainQueues(D:\Prog Test\protractor-cucumber-master\node_modules\bluebird\js\release\async.js:17:14)
runCallback์—์„œ (timers.js:794:20)
tryOnImmediate์—์„œ(timers.js:752:5)
ํ”„๋กœ์„ธ์Šค ์ฆ‰์‹œ [_immediateCallback์œผ๋กœ] (timers.js:729:5)
[18:34:25] E/๋Ÿฐ์ฒ˜ - BUG: ๋Ÿฐ์ฒ˜๊ฐ€ ์ข…๋ฃŒ๋˜๊ณ  ๋‚จ์€ ์ž‘์—… 1๊ฐœ
logger.js:158**

_ ๋‹ค์Œ์€ "npm install" ์‹คํ–‰ ํ›„ ์„ค์น˜๋œ package.json์˜ ์ข…์†์„ฑ์ž…๋‹ˆ๋‹ค. _

`{
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"๋ฐ”๋ฒจ ๋ ˆ์ง€์Šคํ„ฐ": "^6.26.0",
"์ฐจ์ด": "^4.1.2",
"์•ฝ์†๋œ ์ฐจ์ด": "^7.1.1",
"์˜ค์ด": "^3.2.1",
"cucumber-html-report": "^0.6.2",
"cucumber-html-reporter": "^3.0.4",
"cucumberjs-allure-reporter": "^1.0.3",
"mkdirp": "^0.5.1",
"๊ฐ๋„๊ธฐ": "^5.2.0",
"๊ฐ๋„๊ธฐ ์˜ค์ด ํ”„๋ ˆ์ž„์›Œํฌ": "^4.1.1"
},

}
`

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

.vscode/launch.json ์— cwd $๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ง€์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

"cwd": "${์ž‘์—… ๊ณต๊ฐ„ ๋ฃจํŠธ}"

"configurations": [
    {
        "type": "node",
        "request": "launch",
        "name": "Launch Program",
        "cwd": "${workspaceRoot}",
        "program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
        "stopOnEntry": false,
        "args": [
            "${workspaceRoot}/config/config.js"
        ],
    }
]

๋ชจ๋“  3 ๋Œ“๊ธ€

.vscode/launch.json ์— cwd $๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ง€์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

"cwd": "${์ž‘์—… ๊ณต๊ฐ„ ๋ฃจํŠธ}"

"configurations": [
    {
        "type": "node",
        "request": "launch",
        "name": "Launch Program",
        "cwd": "${workspaceRoot}",
        "program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
        "stopOnEntry": false,
        "args": [
            "${workspaceRoot}/config/config.js"
        ],
    }
]

๊ฐ๋„๊ธฐ์™€ VSCode์—์„œ ๋™์ผํ•œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
๋‚˜๋Š” ๊ฐ™์€ ํ”„๋กœ์ ํŠธ์—์„œ ์ง์ ‘ ์˜ค์ด-js๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์•˜๊ณ  ์ž˜ ์ž‘๋™ํ•˜๋ฏ€๋กœ ์ด๊ฒƒ์€ ๊ฐ๋„๊ธฐ ๋˜๋Š” ๊ฐ๋„๊ธฐ-์˜ค์ด ํ”„๋ ˆ์ž„์›Œํฌ์™€ ๊ด€๋ จ์ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๊ฒŒ์‹œํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ๋‚˜๋Š” 1๋…„ ํ›„์— ๊ทธ๊ฒƒ์„ ์ฐพ์•˜๊ณ  'cwd' ์ˆ˜์ •์ด ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰