์๋ ํ์ธ์, ์ ๋ ์ค์ด-js๊ฐ ๋ด ๋จ๊ณ ์ ์๋ฅผ ์ฐพ๊ธฐ ์ํด ๋ช ์๊ฐ ๋์ ๋ ธ๋ ฅํด ์จ ์ด๋ณด์์ ๋๋ค. ์ด ๊ฐ๋จํ ์๋ฅผ ์๊ฐํด ๋์ต๋๋ค.
๊ธฐ๋ฅ/foo.feature์์:
Feature: Foo
Scenario: Bar
Given FooBar
features/step_definitions/step_defs.js์์:
var {defineSupportCode} = require('cucumber');
defineSupportCode(function({Given}) {
Given('FooBar', function () {
return 'pending';
});
});
๋๋์ด ๊ฒฐ๊ณผ๋ฅผ ์ป๋๋ค :
Feature: Foo
Scenario: Bar
? Given FooBar
Warnings:
1) Scenario: Bar - features\foo.feature:2
Step: Given FooBar - features\foo.feature:3
Message:
Undefined. Implement with the following snippet:
Given('FooBar', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
1 scenario (1 undefined)
1 step (1 undefined)
0m00.000s
๋๋ ์ค์ด-js๊ฐ ๋จ๊ณ ์ ์ ํ์ผ์ ์ฐพ๊ณ ์๋ค๋ ๊ฒ์ ์๊ณ ์๋ค. ์๋ํ๋ฉด ๋ด๊ฐ ๊ทธ๊ฒ์ ๊ตฌ๋ฌธ ์ค๋ฅ๋ฅผ ์ฃผ์ ํ๋ฉด ์ค์ด-js๊ฐ ์ค๋ฅ๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ๋ณด๊ณ ํ๊ธฐ ๋๋ฌธ์ด๋ค.
์ด๋ค ๋ฒ์ ์ ์ค์ด-js๋ฅผ ์ฌ์ฉํ๊ณ ์์ต๋๊น?
๊ทธ๊ฒ์ 2.0.0-rc.6์ ๋งํฉ๋๋ค
๋ํ ์ด๋ณด์์ด๊ณ ๋์ผํ ๋ฒ์ ์ cucumber.js๋ฅผ ์คํํ๋ ๋์ผํ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
๋ค๋ฅธ ํํ ๋ฆฌ์ผ์ ๋ฐ๋ฅด๊ณ ์์์ง๋ง ์ด ์์ ์์ ๋งํ์ต๋๋ค.
/features/ํญ๋ชฉ ์ถ๊ฐ.๊ธฐ๋ฅ
Feature: Shopper can add an item to their Grocery List
As a grocery shopper
I want to add an item to my grocery list
So that I can remember to buy that item at the grocery store
Scenario: Item added to grocery list
Given I have an empty grocery list
When I add an item to the list
Then The grocery list contains a single item
Scenario: Item accessible from grocery list
Given I have an empty grocery list
When I add an item to the list
Then I can access that item from the grocery list`
/features/step_definitions/add-item.steps.js
'use strict';
module.exports = function() {
Given('I have an empty grocery list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
When('I add an item to the list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
Then('The grocery list contains a single item', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
Then('I can access that item from the grocery list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
}
$ node_modules/.bin/cucumber-js
๋ฐํ
Feature: Shopper can add an item to their Grocery List
As a grocery shopper
I want to add an item to my grocery list
So that I can remember to buy that item at the grocery store
Scenario: Item added to grocery list
? Given I have an empty grocery list
? When I add an item to the list
? Then The grocery list contains a single item
Scenario: Item accessible from grocery list
? Given I have an empty grocery list
? When I add an item to the list
? Then I can access that item from the grocery list
Warnings:
1) Scenario: Item added to grocery list - features/add-item.feature:6
Step: Given I have an empty grocery list - features/add-item.feature:7
Message:
Undefined. Implement with the following snippet:
Given('I have an empty grocery list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
2) Scenario: Item added to grocery list - features/add-item.feature:6
Step: When I add an item to the list - features/add-item.feature:8
Message:
Undefined. Implement with the following snippet:
When('I add an item to the list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
3) Scenario: Item added to grocery list - features/add-item.feature:6
Step: Then The grocery list contains a single item - features/add-item.feature:9
Message:
Undefined. Implement with the following snippet:
Then('The grocery list contains a single item', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
4) Scenario: Item accessible from grocery list - features/add-item.feature:11
Step: Given I have an empty grocery list - features/add-item.feature:12
Message:
Undefined. Implement with the following snippet:
Given('I have an empty grocery list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
5) Scenario: Item accessible from grocery list - features/add-item.feature:11
Step: When I add an item to the list - features/add-item.feature:13
Message:
Undefined. Implement with the following snippet:
When('I add an item to the list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
6) Scenario: Item accessible from grocery list - features/add-item.feature:11
Step: Then I can access that item from the grocery list - features/add-item.feature:14
Message:
Undefined. Implement with the following snippet:
Then('I can access that item from the grocery list', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
2 scenarios (2 undefined)
6 steps (6 undefined)
0m00.000s
์ด ์์ ์์ world.js ํ์ผ์ ํฌํจ๋์ง ์์์ต๋๋ค.
@dunlop-ben 1.0๊ณผ 2.0 ๋ฆด๋ฆฌ์ค ํ๋ณด์ ์ฐจ์ด์ ์ ๋ํ ๋ณ๊ฒฝ ๋ก๊ทธ๋ฅผ ์ฐธ์กฐํ์ญ์์ค. ๋จ๊ณ๋ฅผ ์ ์ํ๋ ๋ฐฉ๋ฒ์ด ๋ณ๊ฒฝ๋์์ผ๋ฉฐ ๊ทํ์ ์์ ๋ 1.0 ๊ตฌ๋ฌธ์ ์ฌ์ฉํ๋ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค.
@jeffmath ๋์๊ฒ ์๋ฌด ๋ฌธ์ ๊ฐ ์์ด ๋ณด์ ๋๋ค. ๊ฐ๋จํ ์์ ๊ฐ ์๋ํ๋์ง ํ์ธํ๋ ๊ธฐ๋ฅ ํ ์คํธ๊ฐ ์์ต๋๋ค. Mac์์ ์ฌ์ํ๋ฉด ์์๋๋ก ์๋ํฉ๋๋ค. ์ด๋ค ๋ฒ์ ์ ๋ ธ๋๋ฅผ ์คํํ๊ณ ์์ต๋๊น? ๊ทธ๋ฆฌ๊ณ ๋น์ ์ด Windows ์ปดํจํฐ์ ์๋ ๊ฒ์ฒ๋ผ ๋ณด์ด๋ ๊ฒฝ๋ก์์ ๋ง์ต๋๊น?
@charlierudolph - ๊ฐ์ฌํฉ๋๋ค. ๋๋ ์ด๊ฒ์ ์กฐ์ฌํ๊ณ ๋น์ทํ ๊ฒฐ๊ณผ๋ก ๋ช ๊ฐ์ง ๋ค๋ฅธ ์๋ฅผ ์๋ํ์ต๋๋ค. ๋ํ ์ฌ๊ธฐ์์ ๊ธฐ๋ฅ ๋ฐ ๋จ๊ณ ์ ์๋ฅผ ์ฌ์ฉํด ๋ณด์์ต๋๋ค. http://cucumber.github.io/cucumber-js/
๋จ๊ณ ๋ฐ/๋๋ ํ์ผ์ด ๋๋ฝ๋ ๊ฒ ๊ฐ์ต๋๋ค. ์ ๋ฅผ ์๋ดํด ์ค ์ ์๋ ๊ณณ์ด ์๋ค๋ฉด ์ ๋ง ์ข์ ๊ฒ์ ๋๋ค. ๋๋ Github์ ๋ฌธ์๋ฅผ ์ฝ๋ ๋ฐ ์ด์ด ๋ง์ด ์์์ต๋๋ค.
Windows 7์ @charlierudolph ๋ ธ๋ 6.4.0
@charlierudolph ๋น์ทํ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ๋๋ ์ ํํ https://github.com/cucumber/cucumber-js/blob/master/docs/nodejs_example.md๋ฅผ ๋ฐ๋ฅด๊ณ ๋ฌธ์ ๊ฐ ๊ณ์ ๋ฐ์ํฉ๋๋ค.
๋ด ์ค์ ์
@jeffmath @TheAdamW ์ฃ์กํ์ง๋ง ์ ๋ Windows ์์คํ ์ด ์์ด์ ์ด๋ฅผ ์ถ์ ํ ์ ์์ต๋๋ค. ์ฐ๋ฆฌ๋ Windows ์์คํ ์์ ํ ์คํธ๋ฅผ ์คํํ๊ธฐ ์ํด appveyor๋ฅผ ์ฌ์ฉํ๊ณ ์์ผ๋ฉฐ ์ฐจ์ด์ ์ด ๋ฌด์์ธ์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ๋น์ ์ค ํ ์ฌ๋์ด ์ด๊ฒ์ ํํค์ณ ๋ณผ ์ ์์ต๋๊น? ๋ด๊ฐ ํ ์ ์๋ ๋ชจ๋ ๋์์ ๋๋ฆฌ๊ฒ ์ต๋๋ค.
์ ์๊ฒ๋ ./node_modules/.bin/cucumberjs
์ฐ๊ณ ์์ผ๋ฉด ์๋ํ์ง๋ง ์ ์ญ์ ์ผ๋ก ์ค์น๋ cucumberjs
(๋์ผํ ๋ฒ์ 2.0.0-rc.6 )๋ง ์ฐ๋ ๊ฒฝ์ฐ์๋ ์๋ํ์ง ์์ต๋๋ค.
๋์ผํ ์ค๋ฅ: ์ค์ด๊ฐ ๋จ๊ณ ์ ์๋ฅผ ์ฐพ์ ์ ์๋ ๋ฐฉ๋ฒ์ด ์์ต๋๋ค. ๋์ผํ ํด๋ ๊ตฌ์กฐ๋ฅผ ๊ฐ๋ ๊ฒ์ Linux์์ ์๋ํฉ๋๋ค.
๋จ๊ณ ์ ์ ๊ฒฝ๋ก/ํด๋/ํจํด์ ๊ฐ์ ์คํํ๋ ๋ฐฉ๋ฒ์ด ์์ต๋๊น?
BTW @MartinDelille ์ ํธ๋ฆญ์ด ์ ์๊ฒ ํจ๊ณผ๊ฐ ์์์ต๋๋ค.
๋๋ ๊ฐ์๊ธฐ ๊ฐ์ ๋ฌธ์ ์ ์ง๋ฉดํ๊ณ ์์ต๋๋ค. ์ค์ด๋ ์ค๋ ์์นจ๊น์ง ์คํฌ๋ฆฝํธ๋ฅผ ์ ์คํํ์ต๋๋ค. ๋๋ ๊ทธ๊ฒ์ ๋ฌด์์ด ๋ฌธ์ ์ธ์ง ์ ํ ๋ชจ๋ฅธ๋ค.
Ruby mine์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ์ผ๋ก ํด๋ฆญํ์ฌ ๊ธฐ๋ฅ์ ์คํํ๊ณ cucumber -r features/chatstep.feature
๋ช
๋ น์ ์ฌ์ฉํ์ฌ ๋ช
๋ น์ค์์ ๋์ผํ ๊ฒฐ๊ณผ๋ฅผ ์ป์ต๋๋ค.
์๋ฌด๋ ๋์์ฃผ์ธ์
Given(/^I ์์ "([^"]*)"$/) do |arg1|
pending # ์์ ๋ฌธ๊ตฌ๋ฅผ ๊ตฌ์ฒด์ ์ธ ๋์์ผ๋ก ๋ฐ๊พธ๋ ์ฝ๋๋ฅผ ์ฌ๊ธฐ์ ์์ฑํ์ญ์์ค.
๋
์๋ํ๋ ค๋ฉด 1.3.1๋ก ๋ค์ด๊ทธ๋ ์ด๋ํด์ผ ํ์ต๋๋ค.
centos์์๋ ์๋ํ์ง ์์ต๋๋ค.
2017๋ 1์ 25์ผ 21์ 32๋ถ์ "Mrityunjeyan S" [email protected]์ด ๋ค์๊ณผ ๊ฐ์ด ์ผ์ต๋๋ค.
๋๋ ๊ฐ์๊ธฐ ๊ฐ์ ๋ฌธ์ ์ ์ง๋ฉดํ๊ณ ์์ต๋๋ค. ์ค์ด๋ ๊ด์ฐฎ ์์ต๋๋ค.
์ค๋ ์์นจ๊น์ง ์คํฌ๋ฆฝํธ๋ฅผ ์คํํฉ๋๋ค. ๋ญ๊ฐ ์๋ชป๋๋์ง ๋ชจ๋ฅด๊ฒ ์ด
๊ทธ๊ฒ์ผ๋ก.Ruby mine์ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ์ผ๋ก ํด๋ฆญํ๊ณ ๋ค์์ ์ฌ์ฉํ์ฌ ๋ช ๋ น์ค์์ ๊ธฐ๋ฅ์ ์คํํฉ๋๋ค.
์ค์ด -r features/chatstep.feature ๋ช ๋ น์ ์คํํด๋ ๋์ผํ ๊ฒฐ๊ณผ๊ฐ ๋ํ๋ฉ๋๋ค.์๋ฌด๋ ๋์์ฃผ์ธ์
โ
๋น์ ์ด ๋๊ธ์ ๋ฌ์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๋ ๊ฒ์ ๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธ
https://github.com/cucumber/cucumber-js/issues/718#issuecomment-275224435 ,
๋๋ ์ค๋ ๋ ์์๊ฑฐ
https://github.com/notifications/unsubscribe-auth/ALjDKMNdggk1Gh-x_q3KRuvlpN5f_0cOks5rV7E9gaJpZM4LhJZO
.
@jbgraug : ๋ฌด์์ ๋ค์ด๊ทธ๋ ์ด๋ํ์ต๋๊น? ๋ค์ด๊ทธ๋ ์ด๋ ์ Ur ์ด์ ๋ฒ์ ์ ๋ฌด์์ด์์ต๋๊น?
RC 2.0.6 ๋ฐ RC 2.0.0์ผ๋ก ์๋ํ์ต๋๋ค. ๋๋ ๊ทธ๊ฒ์ ๋ฆฌ๋
์ค์์ ์๋ํ๊ฒ ๋ง๋ค ์ ์์๊ฑฐ๋
์ค์ด๋ก ์ฐฝ์ ๋จ๊ณ ์ ์๋ฅผ ์ฐพ์ ์ ์์์ต๋๋ค.
-r ์ต์
.
2017๋
1์ 26์ผ ๋ชฉ์์ผ ์ค์ 6:18 Mrityunjeyan S [email protected]
์ผ๋ค:
@jbgraug https://github.com/jbgraug : ๋ฌด์์ ๋ค์ด๊ทธ๋ ์ด๋ ํ์ต๋๊น? ์ฐ๋ฅด๊ฐ ๋ญ์๋๋ผ
๋ค์ด๊ทธ๋ ์ด๋ ์ ์ด์ ๋ฒ์ โ
๋น์ ์ด ์ธ๊ธ๋์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๋ ๊ฒ์ ๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธ
https://github.com/cucumber/cucumber-js/issues/718#issuecomment-275310070 ,
๋๋ ์ค๋ ๋ ์์๊ฑฐ
https://github.com/notifications/unsubscribe-auth/ALjDKGbyYXvsjlLv-dlz6bnHMfPK7t05ks5rWCypgaJpZM4LhJZO
.
@jbgraug ์ค์ด๊ฐ ๋ฒ์ 2.0์์ ๋ฒ๋ค๋ก ์ ๊ณต๋๋ gherkin
๋ ์ด์ ์ฌ์ฉํ์ง ์๋ ๊ฒ ๊ฐ ์ต๋๊น? ํ์ฌ 1.3.14๋ฅผ ์ค์น ์ค์ด๋ฉฐ fetching gherkin
๋์ด ์๋๋ฐ 2.0 ์ด์ ๋ฒ์ ์ ์ค์นํ๋ ๋์ ์ ํ ๋์น์ฑ์ง ๋ชปํ์ต๋๋ค.
๋ช ๋ น์ค ๋ฐ ํ ์คํธ ์ค๋ํซ์ ๊ธฐ๋ฐ์ผ๋ก ํ @reach2jeyan ์ ์ค์ด-๋ฃจ๋น ์ ๋ํด ์ด์ผ๊ธฐํ๊ณ ์๋ค๊ณ ์๊ฐํฉ๋๋ค. ์ด ๋ ํ๋ก์ ํธ๋ ๊ฐ๊ฐ์ ์ธ์ด์ ๋ํด ์ค์ด ํ๋ ์์ํฌ๋ฅผ ๊ตฌํํ๋ ค๋ ์๋์ ๊ด๋ จ๋์ด ์์ง๋ง ๋ง์ ์ฐจ์ด์ ์ด ์์ต๋๋ค.
@charlierudolph ์ฐธ์ฌํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
๊ทธ๊ฑด ๊ทธ๋ ๊ณ ์ง๊ธ ์๋ํฉ๋๋ค!
@charlierudolph @MartinDelille ๋งํ๋ค ์ ํํ ํตํด ์ ์๋ npm -S
์ ./node_modules/.bin/cucumber.js
,ํ์ง๋ง ํตํด npm -g
์ /usr/local/bin/cucumber.js
, ๊ทธ๊ฒ์ ๋ฐ๊ฒฌํ๊ณ ๋จ๊ณ๋ฅผ ์คํํ์ง๋ง ๋์ค์ ์ด๋ป๊ฒ ๋ ์์ด ๋ฒ๋ฆฝ๋๋ค.
macOS + Node.js 7.5.0 + Cucumber.js 2.0.0-rc.7
windows specific
๋ ์ด๋ธ์ด ์๋ชป๋์์ต๋๋ค.
@kozhevnikov ์ ๋ฐ์ดํธ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค. ์ง๊ธ๊น์ง ๋ชจ๋ ๋ณด๊ณ ์๋ Windows์ ์์์ต๋๋ค(๋ก์ปฌ ์ค์น๋ก ๋ก์ปฌ Mac์์ ๋ค์ ๋ง๋ค ์ ์์์ต๋๋ค). ์ ์ญ ์ค์น๊ฐ ์ด๋ป๊ฒ ๋ ๋ค๋ฅด๋ค๊ณ ์์ํ๊ธฐ ์ด๋ ต์ง๋ง ์ ์ด๋ ์ง๊ธ์ ์กฐ์ฌํ ์ ์์ต๋๋ค.
cygwin์ ํตํด ๋ช ๋ น ํ๋กฌํํธ๋ฅผ ์ฌ์ฉํ์ฌ Windows์์ ๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค. ์ด์ฉ๋ฉด ๊ทธ๊ฒ ๋ฌธ์ ์ ๋๊น? ๋๋ ์ฌ์ง์ด ์์ ์์ ์ง์ ์ฝ๋๋ฅผ ๋ณต์ฌํ์ต๋๋ค.
๊ธฐ๋ฅ: ๊ฐ๋จํ ์ํ
์ํ์ ํ๋ ค๋ฉด
๊ฐ๋ฐ์๋ก์
๋ณ์๋ฅผ ์ฆ๊ฐ์ํค๊ณ ์ถ์ต๋๋ค
์๋๋ฆฌ์ค: ์ฌ์ด ์ํ
๋ณ์๊ฐ 1๋ก ์ค์ ๋ ๊ฒฝ์ฐ
๋ณ์๋ฅผ 1์ฉ ์ฆ๊ฐ์ํค๋ฉด
๊ทธ๋ฐ ๋ค์ ๋ณ์์๋ 2๊ฐ ํฌํจ๋์ด์ผ ํฉ๋๋ค.
์๋๋ฆฌ์ค ๊ฐ์: ํจ์ฌ ๋ ๋ณต์กํ ๊ฒ๋ค
๋ก ์ค์ ๋ ๋ณ์๊ฐ ์ฃผ์ด์ก์ ๋
Examples:
| var | increment | result |
| 100 | 5 | 105 |
| 99 | 1234 | 1333 |
| 12 | 5 | 18 |
Cucumber.defineSupportCode(ํจ์(์ปจํ
์คํธ) {
var setWorldConstructor = context.setWorldConstructor;
var ์ฃผ์ด์ง = context.Given
var When = context.When
var then = context.Then
///// ๋์ ์ธ์ /////
//
// ์ฌ์ฉ์ ์ ์ ์ธ๊ณ๋ก 'setWorldConstructor'๋ฅผ ํธ์ถํฉ๋๋ค(์ ํ ์ฌํญ).
//
var ์ปค์คํ ์๋ = function() {};
CustomWorld.prototype.variable = 0;
CustomWorld.prototype.setTo = ํจ์(์ซ์) {
this.variable = parseInt(์ซ์);
};
CustomWorld.prototype.incrementBy = ํจ์(์ซ์) {
this.variable += parseInt(์ซ์);
};
setWorldConstructor(์ปค์คํ ์๋);
///// ๋จ๊ณ ์ ์ /////
//
// 'Given', 'When' ๋ฐ 'Then'์ ์ฌ์ฉํ์ฌ ๋จ๊ณ ์ ์๋ฅผ ์ ์ธํฉ๋๋ค.
//
์ฃผ์ด์ง(/^ ๋ณ์๊ฐ (\d+)$/๋ก ์ค์ ๋จ, function(number) {
this.setTo(์ซ์);
});
When(/^I ๋ณ์๋ฅผ (\d+)$/ ์ฆ๊ฐ์ํค๋ฉด function(number) {
this.incrementBy(์ซ์);
});
then(/^๋ณ์๋ (\d+)$/, function(number) {
if (this.variable != parseInt(์ซ์))
throw new Error('๋ณ์๋ ' + ์ซ์ +
' ํ์ง๋ง ' + this.variable + '.'๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.);
});
})
์ด ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. "ReferenceError: Given is not defined"
๋๋ ํน์ ํ์ผ ์ด๋ฆ์ผ๋ก ์ค์ด.js ๋ฐ ~/node_modules/.bin/cucumber.js๋ฅผ ์คํํ๊ณ ํญ์ ์ค๋ฅ๋ฅผ ๋์ง๋๋ค. ๋๋ ๋ฌธ์ ์์ด ๋ฃจ๋น๋ก ์ค์ด๋ฅผ ์คํํ ์ ์์ง๋ง ์ค์ด js๊ฐ ์๋ํ๋๋ก ํ ์ ์์ต๋๋ค
๊ด์ฐฎ์. ๋๋ ์ด๊ฒ์ ์์ ๋๋ค๊ณ ๋ฏฟ์ต๋๋ค.
์ค์ด์ ๊ธ๋ก๋ฒ ์ค์น๋ฅผ ์ฌ์ฉํ์ฌ ๊ธฐ๋ฅ ํ ์คํธ๋ฅผ ์คํํ ๋, ์ฌ์ ํ ์ค์ด์ ๋ก์ปฌ ์ค์น๋ฅผ ์๊ตฌํ์ฌ ์ง์ ์ฝ๋๋ฅผ ์ ์ํ๊ณ ์์ต๋๋ค. ์ด๊ฒ์ด ๋ ๊ฐ์ ๋ค๋ฅธ ์ธ์คํด์ค๋ผ๋ ์ฌ์ค๋ก ์ธํด ๋ก๋๋๋ ๋จ๊ณ ์ ์๊ฐ ์์ต๋๋ค.
๋ช ๋ น์ ์คํํ๊ธฐ ์ํด ๋ก์ปฌ ์ค์น๋ฅผ ์ฌ์ฉํ ์ ์๋ ์ด์ ๊ฐ ์์ต๋๊น? ๋ด ๊ฒฝ๋ก์ "./node_modules/.bin"์ ์ถ๊ฐํ์ฌ Mac์์ ์ด ์์ ์ ์ํํฉ๋๋ค.
๋จ๊ณ ์ ์๋ฅผ ์ป๊ธฐ ์ํด ์ ์ญ ์ค์น๊ฐ ๋ก์ปฌ ์ค์น๋ฅผ ์๊ตฌํ๋๋ก ํ์ฌ ์ด ์์ ์ ์ํํ๋ ค๋ ์์ด๋์ด๊ฐ ๋ง์์ ๋ค์ง ์์ต๋๋ค. ๋๋ ๋ํ ์ ๋ ๊ฒฝ๋ก๋ก ์ปดํ์ผ ๋ชจ๋๊ณผ ๊ฐ์ ๊ฒ์ ์ง์ ํด์ผ ํ๊ธฐ ๋๋ฌธ์ ์ ์ญ ์ค์น๋ฅผ ์ซ์ดํฉ๋๋ค.
์ด๊ฒ์ด Windows์์ ๊ฐ๋ฅํ๋ค๋ฉด ์ ์ญ ์ค์น๋ก ์ฌ์ฉํ ์ ์๋ค๋ ๊ฒ์ ์ธ๊ธํ๊ธฐ ์ํด ์ค๋ช ์๋ฅผ ์ ๋ฐ์ดํธํ๋ ๊ฒ์ ์ ํธํฉ๋๋ค.
์ ์ญ ์ค์น ์ ๊ฑฐ์ ๋ํ ๋ ๊ฐ์ง ์ฌ์ํ ์ฌํญ:
๋ชจ๋ ๋ฌธ์๋ ์ ๋ฐ์ดํธ๊ฐ ํ์ํ๋ฉฐ ๊ณต์ ๋ฌธ์๋ฟ๋ง ์๋๋ผ ๊ทธ ์์ ๊ตฌ์ถ๋ ๋ค๋ฅธ ๋ง์ ์ธ๊ธฐ ์๋ ํ๋ ์์ํฌ๋ ํ์ํฉ๋๋ค. ๋๋ ์ด๊ฒ์ ๋ง๋ฌ์ ๋ ๋ฐ๋ผ ๊ฐ๊ณ ์์๊ณ JavaScript/Node.js/Cucumber.js๋ก ๋ง ์์ํ ์ฌ๋์ ์ํด ๋๋ฒ๊ทธํ๋ ๊ฒ์ด ์ข์ ์ค๋ฌ์ ์ต๋๋ค.
๋ง์ IDE์ ํ๋ฌ๊ทธ์ธ์ด ์ ์ญ์ ๊ฐ๋ฆฌํค๋๋ก ํ๋์ฝ๋ฉ๋์ด ์์ต๋๋ค. ๋ํ macOS์์ bash ํ๋กํ ์ธ๋ถ์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ถ๊ฐ(์ฆ, Spotlight๋ฅผ ํตํด WebStorm ์์)ํ๋ ๊ฒ์ ๋ณต์กํ๊ณ ๋ฒ์ ๋ง๋ค ๋ณ๊ฒฝ๋ฉ๋๋ค.
ํ . ์ฌ์ฉ์๊ฐ ๋ก์ปฌ ์ค์ด ์ธ์คํด์ค์ ์์น๋ฅผ โโ์ง์ ํ ์ ์๋ CLI ์ต์
์ ์ถ๊ฐํ ์ ์์ต๋๊น? ๊ธฐ๋ณธ๊ฐ์ process.cwd() + /node_modules/cucumber
๋ก ๋๋ถ๋ถ์ ๊ฒฝ์ฐ๋ฅผ ์ปค๋ฒํด์ผ ํฉ๋๋ค.
@charlierudolph ์๋ ์ค๋ฅ๋ฅผ ๋ณด๊ณ ํ ํ ํ ์คํธ์ ํ์ํ ์ฝ๋๊ฐ Scala.js๋ก ์์ฑ๋์๊ธฐ ๋๋ฌธ์ ์ด์จ๋ Cucumber-JVM์ ์ฌ์ฉํด์ผ ํ๋ค๋ ๊ฒ์ ๊นจ๋ฌ์์ต๋๋ค. ๊ทธ๋ฌ๋ ๋ค์์ Javascript๋ฅผ ํ ์คํธํด์ผ ํ ๋ ํด๊ฒฐ ๋ฐฉ๋ฒ์ ๊ตฌํํ๊ธฐ ์ฌ์ธ ๊ฒ์ ๋๋ค. ๋ฌธ์ ๋ฅผ ์ฐพ์์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
@jeffmath @kozhevnikov ์ฌ๊ธฐ์ ์ด์ ๋ํ ์ ๋ฐ์ดํธ๋ ์๊ฐ์ด ์์ต๋๋ค.
์ผ๋ฐ์ ์ธ ํ ์คํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ๊ตฌ์ถํ๋ ๋์ ๋น์ทํ ๋ฌธ์ ๋ฅผ ๋ฐ๊ฒฌํ์ต๋๋ค. ๋ด ์์ด๋์ด๋ ๋ค๋ฅธ ํ๋ก์ ํธ์์ ํ ์คํธ๋ฅผ ์ฌ์ฌ์ฉํ๋ ๊ฒ์ ๋๋ค.
๋ค๋ฅธ ํ๋ก์ ํธ์์ ์ฌ์ฉํ๊ณ ์ถ์ _roi-functional-tests_๋ผ๋ ๊ณตํต ํ ์คํธ ํจํค์ง๋ฅผ ๋ง๋ค์์ต๋๋ค. ์ง๊ธ๊น์ง, ๋๋ _npm์ link_๊ณผ ํจํค์ง๋ฅผ ์ฐ๊ฒฐ ํ ๋ค์ _roi - ๊ธฐ๋ฅ - tests_,์ด ๊ฐ์์ ๊ธฐ๋ฅ์ ๊ฐ๋ฆฌํจ ์ค์ดํ๋ ค๊ณ :
./node_modules/.bin/cucumberjs ./node_modules/roi-functional-tests/features
๊ทธ๋ฌ๋ ๋๋ ์ด๊ฒ์ ์ป๋๋ค :
Warnings:
1) Scenario: Curl request - node_modules/roi-functional-tests/features/home.feature:3
Step: Given I make curl request to "/" - node_modules/roi-functional-tests/features/home.feature:4
Message:
Undefined. Implement with the following snippet:
Given('I make curl request to {arg1:stringInDoubleQuotes}', function (arg1, callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
์ค์ด๋ ์์ ๋๋ ํ ๋ฆฌ ์ธ๋ถ์์ ์ ์๋ฅผ ๊ฐ์ ธ์ฌ ์ ์์ต๋๊น?
@jramcast ๋ค. ๊ทธ๋ฌ๋ --require
cli ํ๋๊ทธ๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
์ด๋ฏธ --require
ํ๋๊ทธ๋ฅผ ์ฌ์ฉํด ๋ณด์์ต๋๋ค.
./node_modules/.bin/cucumberjs --require ./node_modules/roi-functional-tests/features ./node_modules/roi-functional-tests/features
๊ทธ๋ฌ๋ ๋๋ ๊ฐ์ ๊ฒฐ๊ณผ๋ฅผ ์ป์ต๋๋ค.
npm link
๋ก ์ธํด ์ค์ด๊ฐ ์ ์๋ฅผ ์ฐพ์ง ๋ชปํ ์ ์์ต๋๊น?
๊ทธ๋์ npm link
์์ด ๊ฐ์ ํ
์คํธ
./node_modules/.bin/cucumberjs ./node_modules/roi-functional-tests/features
๋ด ์๊ฐ์ ํจํค์ง๋ฅผ ์ฐ๊ฒฐํ ๋ require
๋ ์ฐ๊ฒฐ๋ ํจํค์ง ๋๋ ํ ๋ฆฌ( node_modules/roi-functional-tests/node_modules/cucumber
) ์์ ์ค์น๋ ์ค์ด๋ฅผ ๋ก๋ํฉ๋๋ค. ๊ทธ๋ฌ๋ _roi-functional-tests_๊ฐ ์ค์น๋ ๊ฒฝ์ฐ npm์ ์ข
์์ฑ ํธ๋ฆฌ๋ฅผ ํ๋ฉดํํ๊ณ ํ๋ก์ ํธ์ node_modules( node_modules/cucumber
) ๋ฐ๋ก ์๋์ ์ค์น๋ ์ค์ด ์ธ์คํด์ค๋ฅผ ์ฌ์ฉํฉ๋๋ค.
๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
์ค์ด ๋ฒ์ : "์ค์ด": "^2.0.0-rc.9"
์๋์ฐ ๋ฒ์ : 10
๋
ธ๋ ๋ฒ์ : 6.10.3 LTS ๋ฐ 7.10
IDE ๋๋ ์ค์ด์ ๊ธ๋ก๋ฒ ์ธ์คํด์ค์์ ์๋ํ์ง ์์ผ๋ฉฐ ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์ด๋ ๋จ๊ณ๋ฅผ ์ฐพ์ง ๋ชปํฉ๋๋ค.
ํ๋ก์ ํธ์ node_modules ๋๋ ํ ๋ฆฌ ๋ด์์ cucumber.js๋ฅผ ํธ์ถํ๋ฉด ์๋ํฉ๋๋ค.
๋๊ตฌ๋ ์ง ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ์ ๋ํ ์ ์์ด ์์ต๋๊น?
์ด๊ฒ์ MacOS Sierra 10.12.4์์๋ ๋ฐ์ํฉ๋๋ค.
๋
ธ๋ ๋ฒ์ 7.10
Cucumber ๋ฒ์ 1.3.0์ผ๋ก ๋์๊ฐ์ ์ด์ ์ ์ญ ์ธ์คํด์ค๋ฅผ ์ฌ์ฉํ์ฌ cmd๋ฅผ ํตํด ํธ์ถํ๊ณ IDE์์ ์๋ํฉ๋๋ค.
์๋
ํ์ธ์ @charlierudolph ,
์ ๋ ๋ค์ ๋จ๊ณ์ ์์ต๋๋ค. (60ํธ์์ ์ฌ๊ธฐ๋ก ์ด๋)
๋ก์ปฌ ์ธ์คํด์ค๋ก๋ง ์คํํ์ง๋ง ๊ธฐ๋ฅ ํ์ผ์ ์คํํ๋ ๋์ ๋จ๊ณ ์ ์๊ฐ ์ธ์๋์ง ์์ต๋๋ค.
๊ธฐ๋ฅ ํ์ผ ๋ฐ ๋จ๊ณ ์ ์ ํ์ผ์ด ์ฌ๋ฐ๋ฅธ ์์น์ ์์ต๋๋ค(์คํฌ๋ฆฐ์ท ์ฒจ๋ถ).
๋ด ๋จ๊ณ ์ ์๊ฐ ์๋ณ๋์ง ์๋ ์ด์ ๋ ๋ฌด์์
๋๊น?
package-lock.json์ 1.X ๋ฒ์ ์ ๋ํ Cucumber ์ฐธ์กฐ๊ฐ ์์ต๋๋ค.
"wdio-cucumber-framework":
"cucumber": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/cucumber/-/cucumber-1.3.3.tgz",
"integrity": "sha1-Za+2Xy+T9y2teN8qterPFGCf7C8=",
"dev": true
},
"webdriverio-cucumber-js":
"cucumber": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cucumber/-/cucumber-1.2.2.tgz",
"integrity": "sha1-KEZJEf8arfwOZjTXY2q69mHGaJI="
},
๋ ๋ฒ์ ์ 2,3,1๋ก ๋ณ๊ฒฝํ์ต๋๋ค.
๋ด ๋
ธ๋ ๋ฒ์ ์ 8.0.0์
๋๋ค.
๊ทธ๋ฌ๋ ์ฌ์ ํ ๋จ๊ณ ์ ์๊ฐ ์ธ์๋์ง ์์ต๋๋ค.
์ด๋ค ์์ด๋์ด๋ผ๋?
@vvedachalam
๋ ๋ฆฝ ์คํํ ๋ชจ๋๊ฐ ์๋ ํ ์คํธ ๋ฌ๋์ ํจ๊ป webdriverIO๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ํ ์คํธ ๋ฌ๋๊ฐ ์ ๋ฒ์ ์ ์ง์ํ์ง ์๊ธฐ ๋๋ฌธ์ 2.x๊ฐ ์๋ 1.3.3์ ์ฌ์ฉํ๋ ๊ฒ์ด ๋ฐ๋์งํฉ๋๋ค. ๋จ๊ณ ์ ์๊ฐ ๊ตฌํ๋๋ ์๋ก์ด ๋ฐฉ๋ฒ.
ํ์ด์ง ๊ฐ์ฒด ๋ชจ๋ธ์ ํ์ํ ํ ์คํธ ๋ฌ๋๋ฅผ ์ฌ์ฉํ๊ณ ๋ชจ๋ ๋ช ๋ น์ด ๋๊ธฐ์ ์ผ๋ก ์คํ๋๋์ง ํ์ธํ๋ฉด์ ์ด์ [email protected] ์ผ๋ก ๋์๊ฐ์ต๋๋ค.
@GeeChao
๋ต์ฅ์ ๋ณด๋ด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค. ๋๋๋ฆฌ๊ณ ํ
์คํธ๋ฅผ ์คํํ๋๋ฐ ์ฌ์ ํ ๋จ๊ณ ์ ์๊ฐ ์ธ์๋์ง ์์ต๋๋ค.
-r ์ ์ฌ์ฉํ์ฌ ๋ช
๋ น์ ์๋ํ๋ฉด ๊ธฐ๋ฅ ํ์ผ์ ๊ตฌ๋ฌธ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค...
C:/webdriverio-test/node_modules/.bin/cucumber-js -r features/customer-validation.feature
C:\webdriverio-testfeatures\customer-validation. ๊ธฐ๋ฅ:2
์์ ์๋ก์
^^
๊ตฌ๋ฌธ ์๋ฌ : ์๊ธฐ์น ์์ ์๋ณ์
createScript์์(vm.js:74:10)
Object.runInThisContext์์(vm.js:116:10)
Module._compile์์ (module.js:533:28)
Object.Module._extensions..js์์ (module.js:580:10)
Module.load์์ (module.js:503:32)
tryModuleLoad์์(module.js:466:12)
Function.Module._load์์ (module.js:458:3)
Module.require์์ (module.js:513:17)
ํ์ ์(internal/module.js:11:18)
C:\webdriverio-test\node_modules\cucumberlib\cliindex.js:135:16์์
Array.forEach์์(๋ค์ดํฐ๋ธ)
Cli.getSupportCodeLibrary์์ (C:\webdriverio-test\node_modules\cucumberlib\cliindex.js:134:24)
ํด๋ฆฌ์์.
Generator.next์์ (
Generator.tryCatcher์์ (C:\webdriverio-test\node_modules\bluebird\js\release\util.js:16:23)
PromiseSpawn._promiseFulfilled(C:\webdriverio-test\node_modules\bluebird\js\release\generators.js:97:49)
@vvedachalam ๋ณต์ ํ ์ ์๋๋ก ์ด๊ฒ์ ์์ฑํ์ฌ ์ ์ฅ์์ ํธ์ํ ์ ์์ต๋๊น?
@GeeChao
ํ๋ฒ ๋ด์ฃผ์ธ์
https://github.com/vvedachalam/Ruffer-Test
@vvedachalam
๊ธฐ๋ฅ ํด๋ ๋ด์์ step_definitions ํด๋๋ฅผ ์ด๋ํ๋ฉด ์์ ์ด ์์๋๊ณ ๋จ๊ณ ์ ์๊ฐ ์ธ์๋ฉ๋๋ค. txtdetails.txt ํ์ผ ์์น๊ฐ ์๋ชป๋ ํ์ ๋ฐ์ํ๋ ์ ์ผํ ๋ฌธ์ ์ ๋๋ค.
@GeeChao
์, sry ๊ทธ ๋ณ๊ฒฝ ์ฌํญ์ ํธ์ํ์ง ์์์ต๋๋ค.
์์ ์คํฌ๋ฆฐ์ท์ ๋ณด๋ฉด ๋จ๊ณ ์ ์๊ฐ ๊ธฐ๋ฅ ํด๋์๋ง ์์ต๋๋ค.
ํฌ๋ง ๋ด์ฉ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
๋ด์ฉ = fs.readFileSync('../../txndetails.txt', 'utf8');
๊ทธ๋ ๋ค๋ฉด ์ ๋ด ๋ก์ปฌ์ ๊ธฐ๋ฅ ํ์ผ์ ๋จ๊ณ ์ ์๋ฅผ ๋ถ์ผ ์ ์์ต๋๊น?
๋ด ์ค์ ์ด ์ฌ๋ฐ๋ฅด์ง ์์ต๋๊น?
@vvedachalam
๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์๋ํฉ๋๋ค.
๋ด๊ฐ ํ ์ ์ผํ ์ผ์ ๊ธฐ๋ฅ ๋๋ ํ ๋ฆฌ ์๋๋ก step_definitions๋ฅผ ์ด๋ํ๋ ๊ฒ์ ๋๋ค.
๋ํ npm install [email protected] --save-dev๋ฅผ ์ํํ์ต๋๋ค.
๊ทธ๋ฐ ๋ค์ node_modules/cucumber/bin/cucumber.js features/๋ฅผ ์คํํ์ต๋๋ค.
@GeeChao ๋ชจ๋ ์ ์๋ํ์ต๋๋ค. ๋ฌธ์ ๋ฅผ ๋ง๋ then ๋ฌธ ์์ For ๋ฃจํ๋ฅผ ๋ง๋ค์์ต๋๋ค. ๋จ๊ณ ์ ์ ๋ด์์ For ๋ฃจํ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๊น?
ํ
์คํธ ํ์ผ ๋ฐ์ดํฐ(๋ฐ์ดํฐ ๊ธฐ๋ฐ ํ
์คํธ)๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๋ค์ ๋จ๊ณ๋ฅผ ์คํํด์ผ ํ๋ฏ๋ก ์์ ๋ฅผ ์ฌ์ฉํ๊ณ ์ถ์ง ์์ต๋๋ค.
์ด ์ง๋ฌธ์ด ์ด ์ฃผ์ ์ ๊ด๋ จ์ด ์๋ค๋ ๊ฒ์ ์๊ณ ์์ง๋ง ๋์์ ๋ฐ์ ์ ์์์ง ์๊ฐํ์ต๋๋ค.
@GeeChao Ok, ๋ค์ ๋ด ์ด๋ฆฌ์์ ์ค์์ ๋๋ค. ๋ฃจํ ๋ณ์๊ฐ ์ ๋๋ก ์ค์ ๋์ง ์์์ต๋๋ค(๊ธธ์ด ๋น๊ต๋ฅผ ์์์ต๋๋ค). ๊ทํ์ ์ง์์ ๋ค์ ํ ๋ฒ ๊ฐ์ฌ๋๋ฆฝ๋๋ค
๋์๊ฒ ์ด๋ณด์๋ก์ ์ค๋ฅ๋ ์ ๊ท ํํ์์ด ์๋ ๋ฌธ์์ด์ ๋จ๊ณ์ ์ ๋ฌํ์ฌ ๋ฐ์ํ์ต๋๋ค.
Then('I log in as (.*)', ...)
๋ณด๋ค๋
Then(/I log in as (.*)', ...)
๊ฐ๋จํ ์ค์์ง๋ง ์ด์ ๋ง ์์ํ๋ ๋ค๋ฅธ ์ฌ๋์๊ฒ ์ ์ฉํ๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
@vvedachalam ์ ๋ฆฌ ํ์ จ๋์? ๋์์ฃผ์๊ฒ ์ด์?
@sancy2017 WDIO ์์ TestCafe ๋๊ตฌ๋ก ์ฎ๊ฒผ์ต๋๋ค. ๊ทธ๋์ ๋ฐ๋ก ํด๊ฒฐ์ฑ ์ ๋ง์๋๋ฆฌ์ง ๋ชปํ ์๋ ์์ต๋๋ค. ๋น์ ์ด ์ง๋ฉดํ๊ณ ์๋ ๋ฌธ์ ๊ฐ ์ ํํ ๋ฌด์์ธ์ง ์๋ ค์ฃผ์ญ์์ค
์ด ์ค๋ฅ์ ๋ํ ๊ฐ๋จํ ํด๊ฒฐ์ฑ
์ npm install [email protected] --save-dev์
๋๋ค.
๊ทธ๋ฐ ๋ค์ ํ
์คํธ๋ฅผ ์คํํ์ญ์์ค. ..npm ํ
์คํธ
"์ค์ด ๋จ๊ณ ์ ์๊ฐ ์ธ์๋์ง ์์์ต๋๋ค"๋ผ๋ ๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ต๋๋ค. ๋๋ ํ ๋ฆฌ ์ด๋ฆ์ "steps"์์ "step_definitions"๋ก ๋ณ๊ฒฝํ๋ฉด ํจ๊ณผ์ ์ด์์ต๋๋ค.
๋๋ ๋๋ถ๋ถ์ ์ฌ๋๋ค์ด ๊ธฐ๋ฅ ๋๋ ํ ๋ฆฌ ์๋์ step_definitions๋ฅผ ๊ฐ์ง๊ณ ์๋ ๊ฒ์ ๋ณด๊ณ ์์ต๋๋ค. ๋ ๋์ ๋ฐฉ๋ฒ์ ๊ธฐ๋ฅ ๋๋ ํ ๋ฆฌ ์๋์ ๋จ๊ณ๋ฅผ ์ ์งํ๋ ๋์ src/step_definitions์ ๊ฐ์ ๋ณ๋์ ๋๋ ํ ๋ฆฌ์ ๋จ๊ณ๋ฅผ ๊ตฌํํ๋ ๊ฒ์ ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ด์ฐฎ์. ๋๋ ์ด๊ฒ์ ์์ ๋๋ค๊ณ ๋ฏฟ์ต๋๋ค.
์ค์ด์ ๊ธ๋ก๋ฒ ์ค์น๋ฅผ ์ฌ์ฉํ์ฌ ๊ธฐ๋ฅ ํ ์คํธ๋ฅผ ์คํํ ๋, ์ฌ์ ํ ์ค์ด์ ๋ก์ปฌ ์ค์น๋ฅผ ์๊ตฌํ์ฌ ์ง์ ์ฝ๋๋ฅผ ์ ์ํ๊ณ ์์ต๋๋ค. ์ด๊ฒ์ด ๋ ๊ฐ์ ๋ค๋ฅธ ์ธ์คํด์ค๋ผ๋ ์ฌ์ค๋ก ์ธํด ๋ก๋๋๋ ๋จ๊ณ ์ ์๊ฐ ์์ต๋๋ค.
๋ช ๋ น์ ์คํํ๊ธฐ ์ํด ๋ก์ปฌ ์ค์น๋ฅผ ์ฌ์ฉํ ์ ์๋ ์ด์ ๊ฐ ์์ต๋๊น? ๋ด ๊ฒฝ๋ก์ "./node_modules/.bin"์ ์ถ๊ฐํ์ฌ Mac์์ ์ด ์์ ์ ์ํํฉ๋๋ค.
๋จ๊ณ ์ ์๋ฅผ ์ป๊ธฐ ์ํด ์ ์ญ ์ค์น๊ฐ ๋ก์ปฌ ์ค์น๋ฅผ ์๊ตฌํ๋๋ก ํ์ฌ ์ด ์์ ์ ์ํํ๋ ค๋ ์์ด๋์ด๊ฐ ๋ง์์ ๋ค์ง ์์ต๋๋ค. ๋๋ ๋ํ ์ ๋ ๊ฒฝ๋ก๋ก ์ปดํ์ผ ๋ชจ๋๊ณผ ๊ฐ์ ๊ฒ์ ์ง์ ํด์ผ ํ๊ธฐ ๋๋ฌธ์ ์ ์ญ ์ค์น๋ฅผ ์ซ์ดํฉ๋๋ค.
์ด๊ฒ์ด Windows์์ ๊ฐ๋ฅํ๋ค๋ฉด ์ ์ญ ์ค์น๋ก ์ฌ์ฉํ ์ ์๋ค๋ ๊ฒ์ ์ธ๊ธํ๊ธฐ ์ํด ์ค๋ช ์๋ฅผ ์ ๋ฐ์ดํธํ๋ ๊ฒ์ ์ ํธํฉ๋๋ค.